Merge pull request #141 from creative-commoners/pulls/4/sapphire-test-nine

API phpunit9 support
This commit is contained in:
Maxime Rainville 2021-10-28 00:00:38 +13:00 committed by GitHub
commit 3ab86f3d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -20,7 +20,8 @@
} }
], ],
"require": { "require": {
"silverstripe/framework": "^4.6@dev", "php": "^7.3 || ^8.0",
"silverstripe/framework": "^4.10",
"silverstripe/admin": "^1.6@dev", "silverstripe/admin": "^1.6@dev",
"silverstripe/versioned": "^1.6@dev", "silverstripe/versioned": "^1.6@dev",
"silverstripe/config": "^1.0@dev", "silverstripe/config": "^1.0@dev",
@ -28,7 +29,8 @@
"silverstripe/vendor-plugin": "^1" "silverstripe/vendor-plugin": "^1"
}, },
"require-dev": { "require-dev": {
"sminnee/phpunit": "^5.7", "phpunit/phpunit": "^9.5",
"dms/phpunit-arraysubset-asserts": "^0.3.0",
"squizlabs/php_codesniffer": "^3.0" "squizlabs/php_codesniffer": "^3.0"
}, },
"extra": { "extra": {

View File

@ -1,8 +1,10 @@
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true"> <phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Default"> <testsuite name="Default">
<directory>tests</directory> <directory>tests</directory>
</testsuite> </testsuite>
</testsuites>
<filter> <filter>
<whitelist addUncoveredFilesFromWhitelist="true"> <whitelist addUncoveredFilesFromWhitelist="true">

View File

@ -5,6 +5,7 @@ use ReflectionClass;
use SilverStripe\Control\Controller; use SilverStripe\Control\Controller;
use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPRequest;
use SilverStripe\Dev\SapphireTest; use SilverStripe\Dev\SapphireTest;
use DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
use SilverStripe\Reports\Report; use SilverStripe\Reports\Report;
use SilverStripe\Reports\ReportAdmin; use SilverStripe\Reports\ReportAdmin;
use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport; use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport;
@ -12,6 +13,8 @@ use SilverStripe\Reports\Tests\ReportAdminTest\FakeReport2;
class ReportAdminTest extends SapphireTest class ReportAdminTest extends SapphireTest
{ {
use ArraySubsetAsserts;
public function testBreadcrumbsAreGenerated() public function testBreadcrumbsAreGenerated()
{ {
$noExtraCrumbs = FakeReport::create(); $noExtraCrumbs = FakeReport::create();