diff --git a/.travis.yml b/.travis.yml index b15e0fa8..c244c3b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,3 @@ version: ~> 1.0 import: - silverstripe/silverstripe-travis-shared:config/provision/standard-jobs-range.yml - -env: - global: - - REQUIRE_RECIPE="4.7.x-dev || " diff --git a/composer.json b/composer.json index 6d819207..502fe101 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,13 @@ } ], "require": { - "php": "^7.1 || ^8.0", - "silverstripe/framework": "^4.7", + "php": "^7.3 || ^8.0", + "silverstripe/framework": "^4.10", "silverstripe/admin": "^1", "asyncphp/doorman": "^3.1" }, "require-dev": { - "sminnee/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3" }, "minimum-stability": "dev", diff --git a/tests/AbstractTest.php b/tests/AbstractTest.php index 12c6a3cc..1c31f511 100644 --- a/tests/AbstractTest.php +++ b/tests/AbstractTest.php @@ -7,7 +7,7 @@ abstract class AbstractTest extends SapphireTest { - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/CleanupJobTest.php b/tests/CleanupJobTest.php index e0f445a6..7df862fd 100644 --- a/tests/CleanupJobTest.php +++ b/tests/CleanupJobTest.php @@ -21,7 +21,7 @@ class CleanupJobTest extends AbstractTest /** * {@inheritDoc} */ - protected function setUp() + protected function setUp(): void { // Have to set a fake time here to work with // the LastEdited dates in the fixture @@ -33,7 +33,7 @@ protected function setUp() /** * {@inheritDoc} */ - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); DBDatetime::clear_mock_now(); @@ -52,7 +52,7 @@ public function testByDays() ); $job->process(); $data = $job->getJobData(); - $this->assertContains("2 jobs cleaned up.", $data->messages[0]); + $this->assertStringContainsString("2 jobs cleaned up.", $data->messages[0]); } public function testByNumber() @@ -68,7 +68,7 @@ public function testByNumber() ); $job->process(); $data = $job->getJobData(); - $this->assertContains("2 jobs cleaned up.", $data->messages[0]); + $this->assertStringContainsString("2 jobs cleaned up.", $data->messages[0]); } public function testByStatus() @@ -84,7 +84,7 @@ public function testByStatus() ); $job->process(); $data = $job->getJobData(); - $this->assertContains("3 jobs cleaned up.", $data->messages[0]); + $this->assertStringContainsString("3 jobs cleaned up.", $data->messages[0]); } public function testNoCleanup() @@ -100,6 +100,6 @@ public function testNoCleanup() ); $job->process(); $data = $job->getJobData(); - $this->assertContains("No jobs to clean up.", $data->messages[0]); + $this->assertStringContainsString("No jobs to clean up.", $data->messages[0]); } } diff --git a/tests/QueuedJobsAdminTest.php b/tests/QueuedJobsAdminTest.php index bb89e054..b9bb11f4 100644 --- a/tests/QueuedJobsAdminTest.php +++ b/tests/QueuedJobsAdminTest.php @@ -41,7 +41,7 @@ class QueuedJobsAdminTest extends FunctionalTest * * {@inheritDoc} */ - protected function setUp() + protected function setUp(): void { parent::setUp(); diff --git a/tests/QueuedJobsTest.php b/tests/QueuedJobsTest.php index cee03b90..16b7e90e 100644 --- a/tests/QueuedJobsTest.php +++ b/tests/QueuedJobsTest.php @@ -34,7 +34,7 @@ class QueuedJobsTest extends AbstractTest /** * {@inheritDoc} */ - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -51,7 +51,7 @@ protected function setUp() DBDatetime::set_mock_now('2016-01-01 16:00:00'); } - protected function tearDown() + protected function tearDown(): void { parent::tearDown(); diff --git a/tests/ScheduledExecutionTest.php b/tests/ScheduledExecutionTest.php index 81cb2dc8..76d87214 100644 --- a/tests/ScheduledExecutionTest.php +++ b/tests/ScheduledExecutionTest.php @@ -29,7 +29,7 @@ class ScheduledExecutionTest extends AbstractTest TestScheduledDataObject::class ); - protected function setUp() + protected function setUp(): void { parent::setUp();