Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API phpunit 9 support #80

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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