diff --git a/tests/LoadTest.php b/tests/LoadTest.php index 2ea7e76..34f3097 100644 --- a/tests/LoadTest.php +++ b/tests/LoadTest.php @@ -166,7 +166,7 @@ class LoadTest extends PHPUnit_Framework_TestCase $autoload = require(self::$file); $this->assertNotEmpty($autoload); - Config::set('DEBUG', 1); + Config::set('DEBUG', true); Load::autoload('Some'); Load::autoload('DbDriver'); } diff --git a/tests/app/ActionTest.php b/tests/app/ActionTest.php index 7fd03ed..6e41b5f 100644 --- a/tests/app/ActionTest.php +++ b/tests/app/ActionTest.php @@ -20,7 +20,7 @@ class ActionTest extends Action_TestCase */ public function testActionConstructWithParams() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('param1' => 'value1', 'param2' => 'value2')); $action = $this->getMockForAbstractClass('Action' ); $this->assertSame('value1', $action->param1); @@ -31,7 +31,7 @@ class ActionTest extends Action_TestCase */ public function testFetch() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $load = new ReflectionClass('Load'); $classes = $load->getProperty('autoload'); $classes->setAccessible(true); @@ -49,7 +49,7 @@ class ActionTest extends Action_TestCase */ public function testFetchNoTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('template' => '')); $controller = FrontController::getInstance(); $controller->setView('SomeView'); @@ -65,7 +65,7 @@ class ActionTest extends Action_TestCase { set_exit_overload(function() { return false; }); - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $load = new ReflectionClass('Action'); $redirect = $load->getMethod('redirect'); $redirect->setAccessible(true); diff --git a/tests/app/AjaxActionTest.php b/tests/app/AjaxActionTest.php index b8f22d2..b8c7c82 100644 --- a/tests/app/AjaxActionTest.php +++ b/tests/app/AjaxActionTest.php @@ -22,7 +22,7 @@ class AjaxActionTest extends Action_TestCase public function testConstruct() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('ajax' => 'AjaxTemplate', 'param2' => 'value2')); $action = $this->getMockForAbstractClass('AjaxAction' ); $this->assertAttributeEquals('ajax', 'template', $action); @@ -34,7 +34,7 @@ class AjaxActionTest extends Action_TestCase public function testFetchWithEncode() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $controller = FrontController::getInstance(); $controller->setView('SomeView'); $action = $this->getMockForAbstractClass('AjaxAction' ); @@ -50,7 +50,7 @@ class AjaxActionTest extends Action_TestCase public function testFetchNoEncode() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('encode' => false)); $controller = FrontController::getInstance(); $controller->setView('SomeView'); diff --git a/tests/app/ErrorActionTest.php b/tests/app/ErrorActionTest.php index 466770a..15a8896 100644 --- a/tests/app/ErrorActionTest.php +++ b/tests/app/ErrorActionTest.php @@ -81,7 +81,7 @@ class ErrorActionTest extends Action_TestCase public function testFetchNoTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $exception = $this->getMock('ErrorException'); $controller = FrontController::getInstance(); $controller->setView('SomeView'); diff --git a/tests/app/PagerActionTest.php b/tests/app/PagerActionTest.php index 386a4e7..1545665 100644 --- a/tests/app/PagerActionTest.php +++ b/tests/app/PagerActionTest.php @@ -22,7 +22,7 @@ class PagerActionTest extends Action_TestCase public function testConstructWithParams() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $action = $this->getMockForAbstractClass('PagerAction'); $this->assertSame(20, $action->getLimit()); $action = $this->getMockForAbstractClass('PagerAction', array(50)); @@ -35,7 +35,7 @@ class PagerActionTest extends Action_TestCase public function testSetCount() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $action = $this->getMockForAbstractClass('PagerAction'); $action->setCount(50); $this->assertSame(1, $action->page); @@ -59,7 +59,7 @@ class PagerActionTest extends Action_TestCase public function testGetOffset() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $action = $this->getMockForAbstractClass('PagerAction'); $this->assertSame(0, $action->getOffset()); } @@ -70,7 +70,7 @@ class PagerActionTest extends Action_TestCase public function testFetchNoTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('template' => '')); $controller = FrontController::getInstance(); $controller->setView('SomeView'); @@ -85,7 +85,7 @@ class PagerActionTest extends Action_TestCase public function testFetchWithTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('template' => 'SomeTemplate')); $controller = FrontController::getInstance(); $controller->setView('SomeView'); diff --git a/tests/app/StaticActionTest.php b/tests/app/StaticActionTest.php index 283e482..cbd34f5 100644 --- a/tests/app/StaticActionTest.php +++ b/tests/app/StaticActionTest.php @@ -22,7 +22,7 @@ class StaticActionTest extends Action_TestCase public function testFetchNoTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('template' => '')); $controller = FrontController::getInstance(); $controller->setView('SomeView'); @@ -37,7 +37,7 @@ class StaticActionTest extends Action_TestCase public function testFetchWithTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); Env::setParams(array('template' => 'SomeTemplate')); $controller = FrontController::getInstance(); $controller->setView('SomeView'); diff --git a/tests/classes/EnvTest.php b/tests/classes/EnvTest.php index 89d3659..60ca94a 100644 --- a/tests/classes/EnvTest.php +++ b/tests/classes/EnvTest.php @@ -25,7 +25,7 @@ class EnvTest extends PHPUnit_Framework_TestCase public function testGetRequestUri() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $_SERVER['REQUEST_URI'] = '/test/index.php?id=1&test=wet&id_theme=512'; $this->assertSame('/test/index.php', Env::getRequestUri()); $_SERVER['REQUEST_URI'] = '/tes?t/index.php?id=1&test=wet&id_theme=512'; @@ -38,7 +38,7 @@ class EnvTest extends PHPUnit_Framework_TestCase public function testTrimBaseRequestUri() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $class = new ReflectionClass('Env'); $this->started = $class->getProperty('request'); $this->started->setAccessible(true); diff --git a/tests/layout/ErrorLayoutTest.php b/tests/layout/ErrorLayoutTest.php index 7ec97fd..b8e8b5e 100644 --- a/tests/layout/ErrorLayoutTest.php +++ b/tests/layout/ErrorLayoutTest.php @@ -43,7 +43,7 @@ class ErrorLayoutTest extends PHPUnit_Framework_TestCase public function testSetException() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $layout = new ErrorLayout(); $layout->setException(new GeneralException()); $this->assertAttributeInstanceOf('GeneralException', 'exception', $layout); @@ -52,7 +52,7 @@ class ErrorLayoutTest extends PHPUnit_Framework_TestCase public function testExecute() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $action = $this->getMock('Action', array('fetch')); $action->expects($this->once()) ->method('fetch') diff --git a/tests/layout/LayoutTest.php b/tests/layout/LayoutTest.php index 44038a4..dd785b6 100644 --- a/tests/layout/LayoutTest.php +++ b/tests/layout/LayoutTest.php @@ -43,7 +43,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase public function testConstruct() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $layout = $this->getMockForAbstractClass('Layout'); $this->assertAttributeInstanceOf('PHPView', 'view', $layout); } @@ -51,7 +51,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase public function testFetch() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $layout = $this->getMockForAbstractClass('Layout'); $action = $this->getMock('Action', array('fetch')); @@ -65,7 +65,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase public function testFetchWithTemplate() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $layout = $this->getMockForAbstractClass('Layout'); $class = new ReflectionClass('Layout'); @@ -89,7 +89,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase public function testAppend() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $layout = $this->getMockForAbstractClass('Layout', array('append', 'prepend'), 'LayoutMock'); $action = $this->getMock('Action', array('fetch')); diff --git a/tests/logger/FileLoggerTest.php b/tests/logger/FileLoggerTest.php index c108f3d..12c905f 100644 --- a/tests/logger/FileLoggerTest.php +++ b/tests/logger/FileLoggerTest.php @@ -55,7 +55,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase */ public function testCannotWrite() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $conf = array('logger' => 'FileLogger', 'filepath' => '/log.txt'); Config::set('Logger', $conf); @@ -70,7 +70,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase */ public function testLog() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->assertFileNotExists($this->conf['filepath']); $logger = Logger::getInstance(); $logger->setPid(123); @@ -83,7 +83,7 @@ class FileLoggerTest extends PHPUnit_Framework_TestCase */ public function testDestruct() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $my_pid = posix_getpid(); $fd_command = 'lsof -n -p ' . $my_pid . ' | wc -l'; $fd_count_start = (int) `$fd_command`; diff --git a/tests/model/MongoDriverTest.php b/tests/model/MongoDriverTest.php index 551a4fa..63cfd1e 100644 --- a/tests/model/MongoDriverTest.php +++ b/tests/model/MongoDriverTest.php @@ -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))); diff --git a/tests/model/MongoModelTest.php b/tests/model/MongoModelTest.php index c15004e..848dc99 100644 --- a/tests/model/MongoModelTest.php +++ b/tests/model/MongoModelTest.php @@ -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)); diff --git a/tests/model/MongoStatementTest.php b/tests/model/MongoStatementTest.php index 6bcd833..5a854ac 100644 --- a/tests/model/MongoStatementTest.php +++ b/tests/model/MongoStatementTest.php @@ -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()) diff --git a/tests/model/MySQLiDriverTest.php b/tests/model/MySQLiDriverTest.php index 6321190..3f67c20 100644 --- a/tests/model/MySQLiDriverTest.php +++ b/tests/model/MySQLiDriverTest.php @@ -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); diff --git a/tests/model/MySQLiStatementTest.php b/tests/model/MySQLiStatementTest.php index e360150..5539796 100644 --- a/tests/model/MySQLiStatementTest.php +++ b/tests/model/MySQLiStatementTest.php @@ -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')); diff --git a/tests/redis/RedisDebugTest.php b/tests/redis/RedisDebugTest.php index c479daa..f6ba5eb 100644 --- a/tests/redis/RedisDebugTest.php +++ b/tests/redis/RedisDebugTest.php @@ -59,7 +59,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase */ public function testCallSimpleParams() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $mock = $this->getMock('Redis', array('connect')); $mock->expects($this->once()) @@ -77,7 +77,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase */ public function testCallArrayParam() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $mock = $this->getMock('Redis', array('connect')); $mock->expects($this->once()) @@ -95,7 +95,7 @@ class RedisDebugTest extends PHPUnit_Framework_TestCase */ public function testCallUndefinedMethod() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $mock = $this->getMock('Redis', array('connect')); $redisDebug = new RedisDebug($mock); diff --git a/tests/redis/RedisManagerTest.php b/tests/redis/RedisManagerTest.php index a64769e..37fd50c 100644 --- a/tests/redis/RedisManagerTest.php +++ b/tests/redis/RedisManagerTest.php @@ -107,7 +107,7 @@ class RedisManagerTest extends PHPUnit_Framework_TestCase */ public function testConnectWithDebug() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->getMock('RedisDebug'); Config::set('Redis', array('new' => array('host' => true, 'port' => 2023, 'database' => true))); diff --git a/tests/util/profiler/ProfilerTest.php b/tests/util/profiler/ProfilerTest.php index 1e7000d..b9426e3 100644 --- a/tests/util/profiler/ProfilerTest.php +++ b/tests/util/profiler/ProfilerTest.php @@ -38,7 +38,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetInstaceNoDebug() { - Config::set('DEBUG', 0); + Config::set('DEBUG', false); $this->setExpectedException('GeneralException', 'Need to turn on DEBUG before use.'); Profiler::getInstance(); } @@ -48,7 +48,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetInstance() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $profiler = Profiler::getInstance(); $this->assertInstanceOf('Profiler', $profiler); $this->assertSame($profiler, Profiler::getInstance()); @@ -59,7 +59,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testProfilerCommand() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->getMock('CommandProfiler', array('getType', 'getCommand', 'getElapsed'), array(), 'CommandProfilerMock', false); $profiler = Profiler::getInstance(); $cmdProfiler = $profiler->profilerCommand('command', 'type'); @@ -71,7 +71,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testStartEndNoCommandProfiler() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $profiler = Profiler::getInstance(); $profiler->start(); $result = $profiler->end(''); @@ -89,7 +89,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testStartEndWithCommandProfiler() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->getMock('CommandProfiler', array('getType', 'getCommand', 'getElapsed'), array(), 'CommandProfilerMock', false); $profiler = Profiler::getInstance(); @@ -107,7 +107,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetJSON() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->getMock('CommandProfiler', array('getType', 'getCommand', 'getElapsed'), array(), 'CommandProfilerMock', false); $profiler = Profiler::getInstance(); @@ -120,7 +120,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetCLI() { - Config::set('DEBUG', 1); + Config::set('DEBUG', true); $this->getMock('CommandProfiler', array('getType', 'getCommand', 'getElapsed'), array(), 'CommandProfilerMock', false); $profiler = Profiler::getInstance();