Skip to content

Commit

Permalink
Merge pull request #64 from creative-commoners/pulls/2/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 1, 2021
2 parents 8ab99f7 + ffa4706 commit 7853fb2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
}
],
"require": {
"silverstripe/framework": "^4"
"php": "^7.3 || ^8.0",
"silverstripe/framework": "^4.10"
},
"require-dev": {
"sminnee/phpunit": "^5.7",
"phpunit/phpunit": "^9.5",
"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 7853fb2

Please sign in to comment.