API phpunit 9 support

This commit is contained in:
Steve Boyd 2021-10-27 18:14:42 +13:00
parent 9c9900f75a
commit 46169f71a0
4 changed files with 11 additions and 8 deletions

View File

@ -17,10 +17,11 @@
} }
], ],
"require": { "require": {
"silverstripe/framework": "^4.0" "php": "^7.3 || ^8.0",
"silverstripe/framework": "^4.10"
}, },
"require-dev": { "require-dev": {
"sminnee/phpunit": "^5.7", "phpunit/phpunit": "^9.5",
"silverstripe/versioned": "^1.0", "silverstripe/versioned": "^1.0",
"squizlabs/php_codesniffer": "^3.0" "squizlabs/php_codesniffer": "^3.0"
}, },

View File

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

View File

@ -17,7 +17,7 @@ class EditableSpamProtectionFieldTest extends SapphireTest
{ {
protected $usesDatabase = true; protected $usesDatabase = true;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();
@ -115,7 +115,7 @@ class EditableSpamProtectionFieldTest extends SapphireTest
{ {
$field = new EditableSpamProtectionField; $field = new EditableSpamProtectionField;
$this->assertContains('/images/editablespamprotectionfield.png', $field->getIcon()); $this->assertStringContainsString('/images/editablespamprotectionfield.png', $field->getIcon());
} }
protected function getFormMock() protected function getFormMock()

View File

@ -25,7 +25,7 @@ class FormSpamProtectionExtensionTest extends SapphireTest
*/ */
protected $form = null; protected $form = null;
protected function setUp() protected function setUp(): void
{ {
parent::setUp(); parent::setUp();