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": {
"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": {

View File

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

View File

@ -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();