[TASK] Unit test fails with recent PHP releases 19/52819/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 17 May 2017 10:24:18 +0000 (12:24 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 17 May 2017 11:12:40 +0000 (13:12 +0200)
Recent PHP unit minor upgrades fixed a bug in DateTimeZone reflection
which is used as test object in our ObjectAccess reflection tests.
Make the test a bit less strict to cope with youngest and older
PHP versions at the same time.

Change-Id: Iaf2290872938f4c04a3307b0fe73c933ca7d69d8
Resolves: #81239
Releases: master, 8.7, 7.6
Reviewed-on: https://review.typo3.org/52819
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php

index 8ec8f25..694fa34 100644 (file)
@@ -294,7 +294,7 @@ class ObjectAccessTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $dateTimeZone = new \DateTimeZone('+2');
         $gettablePropertyNames = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getGettablePropertyNames($dateTimeZone);
         $expectedPropertyNames = ['location', 'name'];
-        $this->assertEquals($gettablePropertyNames, $expectedPropertyNames, 'getGettablePropertyNames does not respect method arguments.');
+        $this->assertArraySubset($expectedPropertyNames, $gettablePropertyNames);
     }
 
     /**