diff --git a/composer.json b/composer.json index af366a9..bf541c9 100644 --- a/composer.json +++ b/composer.json @@ -8,10 +8,12 @@ ], "license": "BSD-3-Clause", "require": { + "php": "^7.3 || ^8.0", + "silverstripe/framework": "^4.10", "cwp/cwp": "^2" }, "require-dev": { - "sminnee/phpunit": "^5.7", + "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "^3" }, "extra": [], diff --git a/tests/Extensions/PdfExportExtensionTest.php b/tests/Extensions/PdfExportExtensionTest.php index 33a9a45..fa63398 100644 --- a/tests/Extensions/PdfExportExtensionTest.php +++ b/tests/Extensions/PdfExportExtensionTest.php @@ -18,7 +18,7 @@ class PdfExportExtensionTest extends SapphireTest ], ]; - protected function setUp() + protected function setUp(): void { parent::setUp(); @@ -38,7 +38,7 @@ public function testPdfFilenameWithoutPublicDirectory($publicDir, $expected) /** @var BasePage|PdfExportExtension $page $page */ $page = $this->objFromFixture(BasePage::class, 'test-page-one'); - $this->assertContains($expected, $page->getPdfFilename()); + $this->assertStringContainsString($expected, $page->getPdfFilename()); } /** @@ -55,13 +55,13 @@ public function pdfFilenameProvider() public function testPdfLink() { $page = $this->objFromFixture(BasePage::class, 'test-page-one'); - $this->assertContains('test-page-one/downloadpdf', $page->PdfLink(), 'Link to download PDF'); + $this->assertStringContainsString('test-page-one/downloadpdf', $page->PdfLink(), 'Link to download PDF'); } public function testHomePagePdfLink() { $page = $this->objFromFixture(BasePage::class, 'home-page'); - $this->assertContains('home/downloadpdf', $page->PdfLink(), 'Link to download PDF'); + $this->assertStringContainsString('home/downloadpdf', $page->PdfLink(), 'Link to download PDF'); } public function testPdfLinkDisabled() diff --git a/tests/Tasks/CleanupGeneratedPdfDailyTaskTest.php b/tests/Tasks/CleanupGeneratedPdfDailyTaskTest.php index f32b3bd..806d878 100644 --- a/tests/Tasks/CleanupGeneratedPdfDailyTaskTest.php +++ b/tests/Tasks/CleanupGeneratedPdfDailyTaskTest.php @@ -14,7 +14,7 @@ class CleanupGeneratedPdfDailyTaskTest extends SapphireTest */ protected $task; - protected function setUp() + protected function setUp(): void { parent::setUp();