Fixed tests with inc Config and Registry classes. Use LOGGING in logger tests.
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
* Unit tests for MySQLiStatement class
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../Registry.php';
|
||||
require_once dirname(__FILE__) . '/../../Config.php';
|
||||
require_once dirname(__FILE__) . '/../../util/profiler/CommandProfiler.php';
|
||||
require_once dirname(__FILE__) . '/../../util/profiler/Profiler.php';
|
||||
require_once dirname(__FILE__) . '/../../model/Db.php';
|
||||
@ -168,7 +170,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteWithDebug()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod()->setRequestExecuteMethod();
|
||||
$this->assertTrue($this->stmt->execute());
|
||||
$this->assertEquals(10, $this->stmt->numRows());
|
||||
@ -180,7 +182,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testBindParam()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -201,7 +203,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -218,7 +220,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWithInitialArray()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -237,7 +239,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromCursor()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -254,7 +256,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromArray()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -274,7 +276,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWrongMode()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -294,7 +296,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipOrderLimit()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -312,7 +314,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -327,7 +329,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCountException()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -345,7 +347,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testOrderException()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -363,7 +365,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipException()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -381,7 +383,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testLimitException()
|
||||
{
|
||||
Config::set('DEBUG', 1;
|
||||
Config::set('DEBUG', 1);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
|
@ -10,6 +10,8 @@
|
||||
* Unit tests for MySQLiStatement class
|
||||
*/
|
||||
|
||||
require_once dirname(__FILE__) . '/../../Registry.php';
|
||||
require_once dirname(__FILE__) . '/../../Config.php';
|
||||
require_once dirname(__FILE__) . '/../../util/profiler/CommandProfiler.php';
|
||||
require_once dirname(__FILE__) . '/../../util/profiler/Profiler.php';
|
||||
require_once dirname(__FILE__) . '/../../model/Db.php';
|
||||
|
Reference in New Issue
Block a user