diff --git a/composer.json b/composer.json index e2d9a60..73274b1 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,10 @@ }, "require-dev": { "topthink/framework": "dev-master", - "phpunit/phpunit": "3.*" + "phpunit/phpunit": "4.8.*" + }, + "config": { + "preferred-install": "dist" }, "autoload": { "psr-4": { diff --git a/tests/InfoTest.php b/tests/InfoTest.php index a897883..ac900a8 100644 --- a/tests/InfoTest.php +++ b/tests/InfoTest.php @@ -18,14 +18,13 @@ class InfoTest extends TestCase public function testOpen() { - $this->expectException(Exception::class); + $this->setExpectedException(Exception::class); Image::open(''); } public function testIllegal() { - $this->expectException(Exception::class); - $this->expectExceptionMessage('Illegal image file'); + $this->setExpectedException(Exception::class, 'Illegal image file'); Image::open(TEST_PATH . 'images/test.bmp'); }