diff --git a/.travis.yml b/.travis.yml index 719a48e..0457012 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ php: - 5.5 - 5.6 - 7.0 + - 7.1 + - 7.2 - hhvm sudo: false diff --git a/composer.json b/composer.json index 8909521..56eab7d 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,9 @@ "phpunit/phpunit": "^4.0|^5.0", "satooshi/php-coveralls": "^0.6" }, + "suggest": { + "ext-gmp": "It can speed up the image hash." + }, "autoload": { "psr-4": { "Jenssegers\\ImageHash\\": "src" diff --git a/phpunit.xml b/phpunit.xml index ac0af93..e828ed2 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -14,4 +14,9 @@ ./tests/ + + + src/ + + diff --git a/tests/ImageHashTest.php b/tests/ImageHashTest.php index 784f8ae..0248984 100644 --- a/tests/ImageHashTest.php +++ b/tests/ImageHashTest.php @@ -1,8 +1,9 @@ expectException('InvalidArgumentException'); - } else { - $this->setExpectedException('InvalidArgumentException'); - } + $this->setExpectedException('InvalidArgumentException'); $this->imageHash->hashFromString('nonImageString'); } diff --git a/tests/ImageTest.php b/tests/ImageTest.php index 3916d61..4dad507 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -5,8 +5,9 @@ use Jenssegers\ImageHash\Implementations\AverageHash; use Jenssegers\ImageHash\Implementations\DifferenceHash; use Jenssegers\ImageHash\Implementations\PerceptualHash; +use PHPUnit\Framework\TestCase; -class ImageTest extends PHPUnit_Framework_TestCase +class ImageTest extends TestCase { /** * @var Implementation[] @@ -154,12 +155,4 @@ public function testDecimalMode() $this->assertTrue(is_int($hash), $hash); $this->assertEquals(0, $imageHash->distance($hash, $hash)); } - - // public function testThrowsUnexceptedValueException() - // { - // $this->setExpectedException('UnexpectedValueException'); - - // $imageHash = new ImageHash; - // $imageHash->distance("a", "b"); - // } }