Skip to content

Commit

Permalink
REFACTOR PHP 8 and PHPUnit 9 compatability (#209)
Browse files Browse the repository at this point in the history
* remove unnecessary requirements
  • Loading branch information
jsirish authored Feb 25, 2022
1 parent b5148f0 commit da94ded
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand Down
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
"license": "BSD-3-Clause",
"type": "silverstripe-vendormodule",
"require": {
"silverstripe/recipe-cms": "^1.0 || ^4.0",
"silverstripe/asset-admin": "^1.0",
"silverstripe/vendor-plugin": "^1.0",
"silverstripe/recipe-cms": "^4.0",
"dynamic/silverstripe-linkable": "^1.0",
"symbiote/silverstripe-gridfieldextensions": "^3.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"silverstripe/recipe-testing": "^2",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {
Expand Down
8 changes: 4 additions & 4 deletions tests/SlideImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testValidateName()
$object = $this->objFromFixture(SlideImage::class, 'slide1');
$object->Name = '';
$object->ImageID = 1;
$this->setExpectedException(ValidationException::class);
$this->expectException(ValidationException::class);
$object->write();

$object->Name = 'Foo';
Expand All @@ -62,7 +62,7 @@ public function testValidateImage()
{
$object = $this->objFromFixture(SlideImage::class, 'slide1');
$object->ImageID = null;
$this->setExpectedException(ValidationException::class);
$this->expectException(ValidationException::class);
$object->write();

$base->ImageID = 1;
Expand All @@ -76,7 +76,7 @@ public function testValidateVideo()
{
$object = $this->objFromFixture(SlideImage::class, 'slide2');
$object->VideoID = null;
$this->setExpectedException(ValidationException::class);
$this->expectException(ValidationException::class);
$object->write();

$object->VideoID = 1;
Expand All @@ -92,7 +92,7 @@ public function testValidateText()
$description = $object->Description;

$object->Description = null;
$this->setExpectedException(ValidationException::class);
$this->expectException(ValidationException::class);
$object->write();

$object->Description = $description;
Expand Down

0 comments on commit da94ded

Please sign in to comment.