replacement @expectedException to setExpectedException
This commit is contained in:
@ -64,14 +64,13 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
/**
|
||||
* @runInSeparateProcess
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage ERROR
|
||||
*/
|
||||
public function testDriverExecuteNoResult()
|
||||
{
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
$this->setExpectedException('GeneralException', 'ERROR');
|
||||
$this->setDriverGetConnectionWrongResultMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
}
|
||||
@ -158,19 +157,16 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testNumRows()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$this->markTestSkipped('Unable to execute a method or access a property of an incomplete object.');
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertNull($this->stmt->numRows());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage Invalid fetch mode
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testFetchInvalidMode()
|
||||
@ -178,6 +174,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
if (!defined('DEBUG')) {
|
||||
define('DEBUG', false);
|
||||
}
|
||||
$this->setExpectedException('GeneralException');
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->stmt->fetch(324);
|
||||
|
Reference in New Issue
Block a user