From 294c56a8c59ce88f1075a22ab6988b8a01c5361a Mon Sep 17 00:00:00 2001 From: tooleks Date: Sun, 28 May 2017 14:52:52 +0300 Subject: [PATCH] Improved tests --- tests/unit/gd/GdImage.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/unit/gd/GdImage.php b/tests/unit/gd/GdImage.php index 1a3c054..77094ae 100644 --- a/tests/unit/gd/GdImage.php +++ b/tests/unit/gd/GdImage.php @@ -68,22 +68,18 @@ public function testCreateFromValidImageResource($resource) * @dataProvider testValidImagePathProvider * @param string $path */ - public function testGetImageWidth(string $path) + public function testGetImageWidth(string $path, int $width, int $height, string $hex, array $rgb) { - $width = Image::createFromPath($path)->getWidth(); - - $this->assertEquals(400, $width); + $this->assertEquals($width, Image::createFromPath($path)->getWidth()); } /** * @dataProvider testValidImagePathProvider * @param string $path */ - public function testGetImageHeight(string $path) + public function testGetImageHeight(string $path, int $width, int $height, string $hex, array $rgb) { - $height = Image::createFromPath($path)->getHeight(); - - $this->assertEquals(225, $height); + $this->assertEquals($height, Image::createFromPath($path)->getHeight()); } /**