Merge pull request #80 from creative-commoners/pulls/3/sapphire-test-nine

API phpunit 9 support
This commit is contained in:
Maxime Rainville 2021-11-01 22:24:02 +13:00 committed by GitHub
commit 04eb8df284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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">
<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

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