18 [
'name' =>
'testPublic',
'is_static' =>
false],
19 [
'name' =>
'_testPrivate',
'is_static' =>
false],
20 [
'name' =>
'_testPropertyBoolean',
'is_static' =>
false],
21 [
'name' =>
'_testPropertyInteger',
'is_static' =>
false],
22 [
'name' =>
'_testPropertyFloat',
'is_static' =>
false],
23 [
'name' =>
'_testPropertyString',
'is_static' =>
false],
24 [
'name' =>
'_testPropertyArray',
'is_static' =>
false],
25 [
'name' =>
'_testPropertyObject',
'is_static' =>
false],
26 [
'name' =>
'testPublicStatic',
'is_static' =>
true],
27 [
'name' =>
'_testProtectedStatic',
'is_static' =>
true],
28 [
'name' =>
'_testPrivateStatic',
'is_static' =>
true],
31 public function testEndTestSuiteDestruct()
33 $phpUnitTestSuite = new \PHPUnit\Framework\TestSuite();
34 $phpUnitTestSuite->addTestFile(
__DIR__ .
'/TestCasePropertiesTest/DummyTestCase.php');
37 $testSuite = $phpUnitTestSuite->testAt(0);
40 $testClass = $testSuite->testAt(0);
42 $propertyObjectMock = $this->createPartialMock(\stdClass::class, [
'__destruct']);
43 $propertyObjectMock->expects($this->atLeastOnce())->method(
'__destruct');
44 $testClass->setPropertyObject($propertyObjectMock);
46 foreach ($this->_fixtureProperties as $property) {
47 if ($property[
'is_static']) {
48 $this->assertAttributeNotEmpty($property[
'name'], get_class($testClass));
50 $this->assertAttributeNotEmpty($property[
'name'], $testClass);
54 $clearProperties = new \Magento\TestFramework\Workaround\Cleanup\TestCaseProperties();
55 $clearProperties->endTestSuite($testSuite);
57 foreach ($this->_fixtureProperties as $property) {
58 if ($property[
'is_static']) {
59 $this->assertAttributeEmpty($property[
'name'], get_class($testClass));
61 $this->assertAttributeEmpty($property[
'name'], $testClass);
defined('TESTS_BP')||define('TESTS_BP' __DIR__