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