Skip to content

Commit

Permalink
API phpunit 9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 27, 2021
1 parent 9c9900f commit 46169f7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
}
],
"require": {
"silverstripe/framework": "^4.0"
"php": "^7.3 || ^8.0",
"silverstripe/framework": "^4.10"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"phpunit/phpunit": "^9.5",
"silverstripe/versioned": "^1.0",
"squizlabs/php_codesniffer": "^3.0"
},
Expand Down
8 changes: 5 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuite name="Default">
<directory>tests</directory>
</testsuite>
<testsuites>
<testsuite name="Default">
<directory>tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
Expand Down
4 changes: 2 additions & 2 deletions tests/EditableSpamProtectionFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EditableSpamProtectionFieldTest extends SapphireTest
{
protected $usesDatabase = true;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -115,7 +115,7 @@ public function testGetIcon()
{
$field = new EditableSpamProtectionField;

$this->assertContains('/images/editablespamprotectionfield.png', $field->getIcon());
$this->assertStringContainsString('/images/editablespamprotectionfield.png', $field->getIcon());
}

protected function getFormMock()
Expand Down
2 changes: 1 addition & 1 deletion tests/FormSpamProtectionExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class FormSpamProtectionExtensionTest extends SapphireTest
*/
protected $form = null;

protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down

0 comments on commit 46169f7

Please sign in to comment.