Skip to content

Commit

Permalink
Merge pull request #37 from creative-commoners/pulls/4/sapphire-test-…
Browse files Browse the repository at this point in the history
…nine

API phpunit 9 support
  • Loading branch information
Maxime Rainville authored Nov 15, 2021
2 parents 1644805 + 137618b commit e4e8aca
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
}
],
"require": {
"php": ">=7.1.0",
"php": "^7.3 || ^8.0",
"silverstripe/admin": "^1.0"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
"phpunit/phpunit": "^9.5",
"silverstripe/framework": "^4.10",
"squizlabs/php_codesniffer": "^3"
},
"autoload": {
"psr-4": {
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/cms/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/php/Control/SudoModeControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SudoModeControllerTest extends FunctionalTest
*/
private $securityTokenEnabled;

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

Expand All @@ -37,7 +37,7 @@ protected function setUp()
$member->changePassword('0p3nS3samE!');
}

protected function tearDown()
protected function tearDown(): void
{
if ($this->securityTokenEnabled) {
SecurityToken::enable();
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Extension/SudoModeOnLoginExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SudoModeOnLoginExtensionTest extends FunctionalTest
],
];

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

Expand Down
2 changes: 1 addition & 1 deletion tests/php/Service/SudoModeServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class SudoModeServiceTest extends SapphireTest
*/
private $service;

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

Expand Down

0 comments on commit e4e8aca

Please sign in to comment.