diff --git a/composer.json b/composer.json index 2db9ced..b567ef7 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "silverstripe/cms": "^4.0" }, "require-dev": { - "sminnee/phpunit": "^5.7", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.0" }, "autoload": { diff --git a/tests/IFramePageTest.php b/tests/IFramePageTest.php index 1d0c461..3eaff01 100644 --- a/tests/IFramePageTest.php +++ b/tests/IFramePageTest.php @@ -19,12 +19,12 @@ public function testGetClass() $iframe->AutoHeight = 1; $iframe->getClass(); - $this->assertContains('iframepage-height-auto', $iframe->getClass()); + $this->assertStringContainsString('iframepage-height-auto', $iframe->getClass()); $iframe->AutoHeight = 0; $iframe->getClass(); - $this->assertNotContains('iframepage-height-auto', $iframe->getClass()); + $this->assertStringNotContainsString('iframepage-height-auto', $iframe->getClass()); } public function testGetStyle() @@ -33,19 +33,19 @@ public function testGetStyle() $iframe->FixedHeight = 0; $iframe->getStyle(); - $this->assertContains('height: 800px', $iframe->getStyle(), 'Height defaults to 800 if not set.'); + $this->assertStringContainsString('height: 800px', $iframe->getStyle(), 'Height defaults to 800 if not set.'); $iframe->FixedHeight = 100; $iframe->getStyle(); - $this->assertContains('height: 100px', $iframe->getStyle(), 'Fixed height is settable'); + $this->assertStringContainsString('height: 100px', $iframe->getStyle(), 'Fixed height is settable'); $iframe->AutoWidth = 1; $iframe->FixedWidth = '200'; - $this->assertContains('width: 100%', $iframe->getStyle(), 'Auto width overrides fixed width'); + $this->assertStringContainsString('width: 100%', $iframe->getStyle(), 'Auto width overrides fixed width'); $iframe->AutoWidth = 0; $iframe->FixedWidth = '200'; - $this->assertContains('width: 200px', $iframe->getStyle(), 'Fixed width is settable'); + $this->assertStringContainsString('width: 200px', $iframe->getStyle(), 'Fixed width is settable'); } public function testAllowedUrls() @@ -85,7 +85,7 @@ public function testAllowedUrls() foreach ($tests['banned'] as $url) { $iframe->IFrameURL = $url; - $this->setExpectedException(ValidationException::class); + $this->expectException(ValidationException::class); $iframe->write(); } }