svn: /pear/packages/Image_Text/trunk/tests/ TextTest.php imageisthesameTest.php
| From: | Daniel O'Connor | Date: | Sat, 12 Nov 2011 01:38:43 +0000 |
| Subject: | svn: /pear/packages/Image_Text/trunk/tests/ TextTest.php imageisthesameTest.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-62675@lists.php.net to get a copy of this message | ||
clockwerx Sat, 12 Nov 2011 01:38:43 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319085
Log:
Fixed tests for phpunit 3.6, skip if gd isn't available
Changed paths:
U pear/packages/Image_Text/trunk/tests/TextTest.php
U pear/packages/Image_Text/trunk/tests/imageisthesameTest.php
Modified: pear/packages/Image_Text/trunk/tests/TextTest.php
===================================================================
--- pear/packages/Image_Text/trunk/tests/TextTest.php 2011-11-12 01:03:44 UTC (rev 319084)
+++ pear/packages/Image_Text/trunk/tests/TextTest.php 2011-11-12 01:38:43 UTC (rev 319085)
@@ -35,6 +35,9 @@
* @access protected
*/
protected function setUp() {
+ if (!extension_loaded('gd')) {
+ $this->markTestSkipped("Requires the gd extension");
+ }
$this->dir = dirname(__FILE__) . '/testimages/';
}
@@ -68,7 +71,7 @@
public function testConstruct() {
return;
$i = $this->initInstance('test');
- $this->assertType('Image_Text', $i);
+ $this->assertSame('Image_Text', get_class($i));
$this->assertTrue($i->init());
$this->assertTrue($i->render());
$this->assertTrue(imageisthesame(
@@ -77,7 +80,7 @@
));
$i = $this->initInstance('text');
- $this->assertType('Image_Text', $i);
+ $this->assertSame('Image_Text', get_class($i));
$this->assertTrue($i->init());
$this->assertTrue($i->render());
$this->assertFalse(imageisthesame(
@@ -89,7 +92,7 @@
public function testBackgroundColor() {
//default background is black
$i = $this->initInstance('test');
- $this->assertType('Image_Text', $i);
+ $this->assertSame('Image_Text', get_class($i));
$this->assertTrue($i->init());
$this->assertTrue($i->render());
$this->assertTrue(imageisthesame(
@@ -99,7 +102,7 @@
//red background
$i = $this->initInstance('text');
- $this->assertType('Image_Text', $i);
+ $this->assertSame('Image_Text', get_class($i));
$i->set(array('background_color' => '#FF0000'));
$this->assertTrue($i->init());
$this->assertTrue($i->render());
@@ -110,7 +113,7 @@
//transparent background
$i = $this->initInstance('text');
- $this->assertType('Image_Text', $i);
+ $this->assertSame('Image_Text', get_class($i));
$i->set(array('background_color' => null));
$this->assertTrue($i->init());
$this->assertTrue($i->render());
Modified: pear/packages/Image_Text/trunk/tests/imageisthesameTest.php
===================================================================
--- pear/packages/Image_Text/trunk/tests/imageisthesameTest.php 2011-11-12 01:03:44 UTC (rev 319084)
+++ pear/packages/Image_Text/trunk/tests/imageisthesameTest.php 2011-11-12 01:38:43 UTC (rev 319085)
@@ -34,6 +34,9 @@
* @access protected
*/
protected function setUp() {
+ if (!extension_loaded('gd')) {
+ $this->markTestSkipped("Requires the gd extension");
+ }
$this->dir = dirname(__FILE__) . '/testimages/';
}