Replace 0 to false and 1 to true in Config:;set(DEBUG...) in majestic tests.
This commit is contained in:
@ -114,7 +114,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFind()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(1, $mongo->find('items', array('name' => 'bread'))->numRows());
|
||||
@ -143,7 +143,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testOrderSkipLimit()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
|
||||
@ -180,7 +180,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(5, $mongo->count('items'));
|
||||
$this->assertEquals(2, $mongo->count('items', array('name' => 'eggs')));
|
||||
@ -193,7 +193,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCursorCount()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(5, $mongo->find('items')->count(5));
|
||||
$this->assertCount(3, $mongo->find('items')->limit(3)->fetchAll());
|
||||
@ -206,7 +206,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGet()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$eggs = $mongo->get('items', array('name' => 'eggs'))->fetchObject();
|
||||
@ -222,7 +222,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testRemove()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(1, $mongo->find('items', array('name' => 'bread'))->numRows());
|
||||
@ -238,7 +238,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testInsert()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(1, $mongo->find('items', array('name' => 'bread'))->numRows());
|
||||
@ -255,7 +255,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testBatchInsert()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$data = array(
|
||||
array('name' => 'first object'),
|
||||
@ -276,7 +276,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetInsertId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(0, $mongo->getInsertId());
|
||||
@ -298,7 +298,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testUpdate()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->assertEquals(1, $mongo->find('items', array('name' => 'bread'))->numRows());
|
||||
@ -316,7 +316,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testUpsert()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
|
||||
@ -331,7 +331,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFindAndModify()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
|
||||
@ -347,7 +347,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFindAndModifyNoItem()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
|
||||
@ -363,7 +363,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testEvalCommand()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$result = $mongo->command('items', array('$eval' => 'function() { return db.items.count();}'));
|
||||
$this->assertEquals(5, $result->fetch());
|
||||
@ -378,7 +378,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testEval()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$result = $mongo->command('items', array('$eval' => 'function() {return true; }'));
|
||||
$this->assertTrue($result->fetch());
|
||||
@ -394,7 +394,7 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCommand()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$result = $mongo->command('items', array('distinct' => 'items', 'key' => 'name'));
|
||||
$this->assertEquals(4, count($result->fetch(DB::FETCH_ASSOC)));
|
||||
|
@ -64,7 +64,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFind()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$result = $this->model->find();
|
||||
$this->assertInstanceOf('MongoStatement', $result);
|
||||
$this->assertEquals('milk', $result->limit(2)->order(array('name' => -1))->fetch()->name);
|
||||
@ -81,7 +81,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGet()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$result = $this->model->find()->limit(1)->order(array('name' => 1));
|
||||
$result = $result->fetch();
|
||||
$this->assertEquals('bread', $result->name);
|
||||
@ -95,7 +95,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$result = $this->model->find()->limit(1)->order(array('name' => 1));
|
||||
$id = $result->fetch()->_id;
|
||||
$this->assertEquals(1, $this->model->delete($id));
|
||||
@ -108,7 +108,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testBatchInsert()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$data = array(
|
||||
array('name' => 'first object'),
|
||||
array('name' => 'second object'),
|
||||
@ -127,7 +127,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDeleteAll()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$this->assertEquals(2, $this->model->count(array('name' => 'eggs')));
|
||||
$this->assertEquals(0, $this->model->deleteAll(array('name' => 'eggs')));
|
||||
@ -140,7 +140,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->assertEquals(5, $this->model->count());
|
||||
$this->assertEquals(2, $this->model->count(array('name' => 'eggs')));
|
||||
}
|
||||
@ -151,7 +151,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$mock = $this->getMock('CacheKey', array('set', 'get'));
|
||||
$mock->expects($this->exactly(3))
|
||||
@ -190,7 +190,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testUseMongoId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$this->assertAttributeEquals(true, 'useMongoId', $this->model);
|
||||
}
|
||||
@ -201,7 +201,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$class = new ReflectionClass('MongoModel');
|
||||
$prop = $class->getProperty('useMongoId');
|
||||
$prop->setAccessible(true);
|
||||
@ -221,7 +221,7 @@ class MongoModelTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testIdToMongoId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$this->model->insert(array('name' => 'testbread', 'price' => 3.2, 'quantity' => 10));
|
||||
$this->model->insert(array('name' => 'testbread', 'price' => 12, 'quantity' => 2));
|
||||
|
@ -63,7 +63,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAffectedNumRowsNoResult()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->assertFalse($this->stmt->affectedRows());
|
||||
$this->assertFalse($this->stmt->numRows());
|
||||
|
||||
@ -82,7 +82,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAffectedNumRows()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -98,7 +98,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testGetInsertId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
|
||||
$this->request = $this->getMockBuilder('InsertMongoCommand')
|
||||
@ -127,7 +127,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecute()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestExecuteMethod();
|
||||
$this->assertTrue($this->stmt->execute());
|
||||
@ -139,7 +139,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoResult()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->any())
|
||||
@ -155,7 +155,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoConnection()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->driver
|
||||
->expects($this->any())
|
||||
->method('getConnection')
|
||||
@ -170,7 +170,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteWithDebug()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod()->setRequestExecuteMethod();
|
||||
$this->assertTrue($this->stmt->execute());
|
||||
$this->assertEquals(10, $this->stmt->numRows());
|
||||
@ -182,7 +182,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testBindParam()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -203,7 +203,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -220,7 +220,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWithInitialArray()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -239,7 +239,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromCursor()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
@ -256,7 +256,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchAssocFromArray()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -276,7 +276,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchWrongMode()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
|
||||
$this->setDriverGetConnectionMethod();
|
||||
@ -296,7 +296,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipOrderLimit()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -314,7 +314,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod()->setRequestForFetch();
|
||||
|
||||
$this->stmt->execute();
|
||||
@ -329,7 +329,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testCountException()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -347,7 +347,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testOrderException()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -365,7 +365,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testSkipException()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
@ -383,7 +383,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testLimitException()
|
||||
{
|
||||
Config::set('DEBUG', 1);
|
||||
Config::set('DEBUG', true);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->request
|
||||
->expects($this->once())
|
||||
|
@ -57,7 +57,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testDriver()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -76,7 +76,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testGetConnection()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
$this->assertInstanceOf('mysqli', $driver->getConnection());
|
||||
@ -87,7 +87,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testGetConnectionWrongConfig()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->conf['database'] = 'nodb';
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -100,7 +100,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testDisconnect()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -117,7 +117,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testInsert()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -137,7 +137,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testGetInsertId()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -149,7 +149,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testTransaction()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
@ -180,7 +180,7 @@ class MySQLiDriverTest extends PHPUnit_Extensions_Database_TestCase
|
||||
*/
|
||||
public function testRollback()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$driver = new MySQLiDriver($this->conf);
|
||||
|
||||
|
@ -83,7 +83,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecute()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$this->driver
|
||||
->expects($this->any())
|
||||
@ -102,7 +102,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testExecuteNoPlaceholders()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
|
||||
$this->sql = 'PLAIN SQL';
|
||||
@ -116,7 +116,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchNoResult()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->assertFalse($this->stmt->fetch());
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDriverExecuteNoResult()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionWrongResultMethod();
|
||||
$this->setExpectedException('GeneralException', 'ERROR');
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
@ -138,7 +138,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetch()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertSame('OBJECT', $this->stmt->fetch());
|
||||
@ -153,7 +153,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchObject()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertSame('OBJECT', $this->stmt->fetchObject());
|
||||
@ -165,7 +165,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchPairs()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
|
||||
$resultMock = $this->getMockBuilder('mysqli_result')
|
||||
->disableOriginalConstructor()
|
||||
@ -220,7 +220,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testClose()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->assertAttributeEquals(null, 'result', $this->stmt);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
@ -261,7 +261,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
public function testNumRows()
|
||||
{
|
||||
$this->markTestSkipped('Unable to execute a method or access a property of an incomplete object.');
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
$this->assertNull($this->stmt->numRows());
|
||||
@ -273,7 +273,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testFetchInvalidMode()
|
||||
{
|
||||
Config::set('DEBUG', 0);
|
||||
Config::set('DEBUG', false);
|
||||
$this->setDriverGetConnectionMethod();
|
||||
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
|
||||
|
||||
|
Reference in New Issue
Block a user