Skip to content

Commit 510adb6

Browse files
committed
AC-12823: Unit Test fixes
1 parent a6bf743 commit 510adb6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Workaround/Cleanup/TestCasePropertiesTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,15 @@ public function testEndTestSuiteDestruct(): void
4242
/** @var TestSuite $testSuite */
4343
$testSuite = current($phpUnitTestSuite->tests());
4444
$testSuite->run();
45-
/** @var \Magento\Test\Workaround\Cleanup\TestCasePropertiesTest\DummyTestCase $testClass */
46-
$testClass = current($testSuite->tests());
4745

48-
$reflectionClass = new \ReflectionClass($testClass);
46+
$reflectionClass = new \ReflectionClass($testSuite);
4947
$classProperties = $reflectionClass->getProperties();
5048
$fixturePropertiesNames = array_keys($this->fixtureProperties);
5149

5250
foreach ($classProperties as $property) {
5351
if (in_array($property->getName(), $fixturePropertiesNames)) {
5452
$property->setAccessible(true);
55-
$value = $property->getValue($testClass);
53+
$value = $property->getValue($testSuite);
5654
$this->assertNotNull($value);
5755
}
5856
}
@@ -62,7 +60,7 @@ public function testEndTestSuiteDestruct(): void
6260
foreach ($classProperties as $property) {
6361
if (in_array($property->getName(), $fixturePropertiesNames)) {
6462
$property->setAccessible(true);
65-
$value = $property->getValue($testClass);
63+
$value = $property->getValue($testSuite);
6664
$this->assertNull($value);
6765
}
6866
}

0 commit comments

Comments
 (0)