From d3cf6aa55f9a6c70e9dc751a97734b89d9585c80 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Wed, 30 Jan 2013 16:57:09 +0100 Subject: [PATCH] added tests --- tests/ImageTest.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/ImageTest.php b/tests/ImageTest.php index 9790f89d..1b953620 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -1,6 +1,7 @@ assertInstanceOf('Intervention\Image\Image', $img); } + public function testFillImage() + { + $img = $this->getTestImage(); + $img = $img->fill('fdf5e4'); + $this->assertInstanceOf('Intervention\Image\Image', $img); + + $img = $img->fill(array(155, 155, 155), rand(1,10), rand(1,10)); + $this->assertInstanceOf('Intervention\Image\Image', $img); + } + + public function testPixelImage() + { + $img = $this->getTestImage(); + $img = $img->pixel('fdf5e4', rand(1,10), rand(1,10)); + $this->assertInstanceOf('Intervention\Image\Image', $img); + + $img = $img->pixel(array(255, 255, 255), rand(1,10), rand(1,10)); + $this->assertInstanceOf('Intervention\Image\Image', $img); + } + + public function testTextImage() + { + $img = $this->getTestImage(); + $img = $img->text('Fox', 10, 10, 0, 16, '000000', null); + $this->assertInstanceOf('Intervention\Image\Image', $img); + } + public function testResetImage() { $img = $this->getTestImage();