Skip to content

Commit

Permalink
Merge pull request #7 from GastonGelhorn/update-to-php8
Browse files Browse the repository at this point in the history
update to php8 and update tests to work on php 8
  • Loading branch information
GastonGelhorn authored Sep 16, 2021
2 parents 2b465b2 + dd89845 commit 0f38a14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
}
],
"require": {
"php" : "~7.2"
"php" : "~7.2|~8.0"
},
"require-dev": {
"phpunit/phpunit" : "4.*",
"phpunit/phpunit" : "~9.5.9",
"scrutinizer/ocular": "~1.1",
"squizlabs/php_codesniffer": "~2.3"
},
Expand Down
16 changes: 10 additions & 6 deletions tests/ResizedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

namespace Square1\Resized\Test;

use PHPUnit\Framework\TestCase;
use Square1\Resized\Resized;

class ResizedTest extends \PHPUnit_Framework_TestCase
class ResizedTest extends TestCase
{
/**
* Test invalid secret
*/
public function testInvalidSecret()
{
$this->setExpectedException(\InvalidArgumentException::class, 'Invalid Secret');
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid Secret');

$resized = new Resized('key', 'secret-123456789');
}
Expand All @@ -21,7 +23,8 @@ public function testInvalidSecret()
*/
public function testInvalidDefaultURL()
{
$this->setExpectedException(\InvalidArgumentException::class, 'Invalid Default Image URL');
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid Default Image URL');

$resized = new Resized('key', 'secret-d0be2dc421be4fcd0172e5afceea3970e2f3d940');
$resized->setDefaultImage('http:/www.example.com/no-image.jpg');
Expand All @@ -32,7 +35,8 @@ public function testInvalidDefaultURL()
*/
public function testInvalidHost()
{
$this->setExpectedException(\InvalidArgumentException::class, 'Invalid Host URL');
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid Host URL');

$resized = new Resized('key', 'secret-d0be2dc421be4fcd0172e5afceea3970e2f3d940');
$resized->setHost('https:/img.resized.co');
Expand Down Expand Up @@ -136,8 +140,8 @@ public function testEmptyConstraintParams()
}

/**
* Test no contraints params
*/
* Test no contraints params
*/
public function testNoConstraintParams()
{
$resized = new Resized('key', 'secret-d0be2dc421be4fcd0172e5afceea3970e2f3d940');
Expand Down

0 comments on commit 0f38a14

Please sign in to comment.