Use assertInstanceOf instead of manual testing

This commit is contained in:
Michal Čihař 2012-09-04 15:16:09 +02:00
parent 5ef6f6a98c
commit ff16e8bdd0
10 changed files with 19 additions and 10 deletions

View File

@ -99,7 +99,10 @@ class PMA_DBQbe_test extends PHPUnit_Framework_TestCase
* Test for getCommonFunctions
*/
public function testGetCommonFunctions(){
$this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
$this->assertInstanceOf(
'PMA_CommonFunctions',
$this->object->getCommonFunctions()
);
}
/**

View File

@ -76,7 +76,10 @@ class PMA_DbSearch_test extends PHPUnit_Framework_TestCase
* Test for getCommonFunctions
*/
public function testGetCommonFunctions(){
$this->assertTrue($this->object->getCommonFunctions() instanceof PMA_CommonFunctions);
$this->assertInstanceOf(
'PMA_CommonFunctions',
$this->object->getCommonFunctions()
);
}
/**

View File

@ -101,7 +101,10 @@ class PMA_Theme_Manager_test extends PHPUnit_Framework_TestCase
*/
public function testGetFallBackTheme(){
$tm = new PMA_Theme_Manager();
$this->assertTrue($tm->getFallBackTheme() instanceof PMA_Theme);
$this->assertInstanceOf(
'PMA_theme',
$tm->getFallBackTheme()
);
}
}

View File

@ -236,7 +236,7 @@ class PMA_GIS_Geometrycollection_test extends PHPUnit_Framework_TestCase
$return = $this->object->prepareRowAsPdf(
$spatial, $label, $line_color, $scale_data, $pdf
);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf()

View File

@ -220,7 +220,7 @@ class PMA_GIS_LinestringTest extends PMA_GIS_GeomTest
$return = $this->object->prepareRowAsPdf(
$spatial, $label, $line_color, $scale_data, $pdf
);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf()

View File

@ -276,7 +276,7 @@ class PMA_GIS_MultilinestringTest extends PMA_GIS_GeomTest
{
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf(){

View File

@ -220,7 +220,7 @@ class PMA_GIS_MultipointTest extends PMA_GIS_GeomTest
{
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf(){

View File

@ -314,7 +314,7 @@ class PMA_GIS_MultipolygonTest extends PMA_GIS_GeomTest
{
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf(){

View File

@ -222,7 +222,7 @@ class PMA_GIS_PointTest extends PMA_GIS_GeomTest
{
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf(){

View File

@ -402,7 +402,7 @@ class PMA_GIS_PolygonTest extends PMA_GIS_GeomTest
{
$return = $this->object->prepareRowAsPdf($spatial, $label, $line_color, $scale_data, $pdf);
$this->assertTrue($return instanceof TCPDF);
$this->assertInstanceOf('TCPDF', $return);
}
public function providerForPrepareRowAsPdf(){