From 9f76ec2a43f78c7f17d79e7c96328830f3c0fcda Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 27 Oct 2021 17:52:11 +1300 Subject: [PATCH] API phpunit9 support --- composer.json | 6 ++++-- phpunit.xml.dist | 8 +++++--- tests/ReportAdminTest.php | 3 +++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 545972f0..9c5d18b2 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ } ], "require": { - "silverstripe/framework": "^4.6@dev", + "php": "^7.3 || ^8.0", + "silverstripe/framework": "^4.10", "silverstripe/admin": "^1.6@dev", "silverstripe/versioned": "^1.6@dev", "silverstripe/config": "^1.0@dev", @@ -28,7 +29,8 @@ "silverstripe/vendor-plugin": "^1" }, "require-dev": { - "sminnee/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", + "dms/phpunit-arraysubset-asserts": "^0.3.0", "squizlabs/php_codesniffer": "^3.0" }, "extra": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6852caf8..6e84609a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,8 +1,10 @@ - - tests - + + + tests + + diff --git a/tests/ReportAdminTest.php b/tests/ReportAdminTest.php index 97e5b49c..3da725df 100644 --- a/tests/ReportAdminTest.php +++ b/tests/ReportAdminTest.php @@ -5,6 +5,7 @@ use ReflectionClass; use SilverStripe\Control\Controller; use SilverStripe\Control\HTTPRequest; use SilverStripe\Dev\SapphireTest; +use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts; use SilverStripe\Reports\Report; use SilverStripe\Reports\ReportAdmin; use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport; @@ -12,6 +13,8 @@ use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport2; class ReportAdminTest extends SapphireTest { + use ArraySubsetAsserts; + public function testBreadcrumbsAreGenerated() { $noExtraCrumbs = FakeReport::create();