diff --git a/composer.json b/composer.json index c3c0d43a..e1ea8d53 100755 --- a/composer.json +++ b/composer.json @@ -26,7 +26,6 @@ }, "require-dev": { "silverstripe/recipe-testing": "^2", - "dms/phpunit-arraysubset-asserts": "^0.3.0", "silverstripe/graphql": "^3.5 || ^4", "squizlabs/php_codesniffer": "^3" }, diff --git a/tests/php/VersionedTest.php b/tests/php/VersionedTest.php index 9728608a..c6976e9c 100644 --- a/tests/php/VersionedTest.php +++ b/tests/php/VersionedTest.php @@ -27,8 +27,6 @@ class VersionedTest extends SapphireTest { - use ArraySubsetAsserts; - protected static $fixture_file = 'VersionedTest.yml'; public static $extra_dataobjects = [ @@ -664,7 +662,13 @@ public function testGetVersion() 'Versioned.stage' => Versioned::DRAFT, ]; $this->assertEquals($archiveParms, $page2v1->getInheritableQueryParams()); - $this->assertArraySubset($archiveParms, $page2v1->Children()->getQueryParams()); + $queryParms = $page2v1->Children()->getQueryParams(); + foreach ($queryParms as $key => $val) { + if (!array_key_exists($key, $archiveParms)) { + continue; + } + $this->assertSame($val, $queryParms[$key], "queryParms[$key] should be $val"); + } $this->assertListEquals( [ ['Title' => 'Page 2a'], @@ -686,7 +690,13 @@ public function testGetVersion() 'Versioned.stage' => Versioned::DRAFT, ]; $this->assertEquals($archiveParms, $page2v2->getInheritableQueryParams()); - $this->assertArraySubset($archiveParms, $page2v2->Children()->getQueryParams()); + $queryParms = $page2v1->Children()->getQueryParams(); + foreach ($queryParms as $key => $val) { + if (!array_key_exists($key, $archiveParms)) { + continue; + } + $this->assertSame($val, $queryParms[$key], "queryParms[$key] should be $val"); + } $this->assertListEquals( [ ['Title' => 'Page 2a - v2'], @@ -1304,6 +1314,7 @@ public function testVersionedHandlesRenamedDataObjectFields() $testData = new VersionedTest\RelatedWithoutversion(); $testData->NewField = 'Test'; $testData->write(); + $this->assertTrue(true, 'No exceptions were thrown'); } public function testCanView()