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 19, 2021
1 parent 8ab99f7 commit 7afaeb3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
}
],
"require": {
"silverstripe/framework": "^4"
"silverstripe/framework": "^4.10"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"phpunit/phpunit": "^9",
"squizlabs/php_codesniffer": "^3.0",
"silverstripe/versioned": "^1"
},
Expand Down
8 changes: 5 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<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/AbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ abstract class AbstractTest extends SapphireTest
{
protected $usesDatabase = true;

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

Expand All @@ -26,7 +26,7 @@ protected function setUp()
DBDatetime::set_mock_now('2010-03-15 12:00:00');
}

protected function tearDown()
protected function tearDown(): void
{
DBDatetime::clear_mock_now();

Expand Down
2 changes: 1 addition & 1 deletion tests/DatabaseStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class DatabaseStoreTest extends AbstractTest
{
protected function setUp()
protected function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/HybridSessionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class HybridSessionTest extends SapphireTest
*/
protected $instance;

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

Expand Down

0 comments on commit 7afaeb3

Please sign in to comment.