replace Exception on GeneralException

This commit is contained in:
Vyacheslav Agafonov
2011-11-25 19:50:41 +04:00
parent d4705b1c89
commit 443655064c
11 changed files with 26 additions and 20 deletions

View File

@ -16,6 +16,7 @@ require_once dirname(__FILE__) . '/../../model/Db.php';
require_once dirname(__FILE__) . '/../../model/DbDriver.php';
require_once dirname(__FILE__) . '/../../model/DbStatement.php';
require_once dirname(__FILE__) . '/../../model/MySQLiStatement.php';
require_once dirname(__FILE__) . '/../../exception/GeneralException.php';
class MySQLiStatementTest extends PHPUnit_Framework_TestCase
{
@ -63,7 +64,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage ERROR
*/
public function testDriverExecuteNoResult()
@ -153,22 +154,22 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
* @expectedException Exception
* @TODO: exception just for code coverage - could not mock mysqli properties
*/
public function testNumRows()
{
$this->markTestSkipped();
if (!defined('DEBUG')) {
define('DEBUG', false);
}
$this->setDriverGetConnectionMethod();
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
$this->assertNull($this->stmt->numRows());
}
/**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage Invalid fetch mode
* @runInSeparateProcess
*/