From 69cd61121e1ed153901438da2e67799485db7b92 Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Mon, 9 Jul 2012 14:28:02 +0400 Subject: [PATCH] Fixed tests RedisDebugTest, ProfilerTest with use PROFILER setting. --- tests/redis/RedisDebugTest.php | 6 +++--- tests/util/profiler/ProfilerTest.php | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/redis/RedisDebugTest.php b/tests/redis/RedisDebugTest.php index f6ba5eb..97e0cc5 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', true); $mock = $this->getMock('Redis', array('connect')); $redisDebug = new RedisDebug($mock); diff --git a/tests/util/profiler/ProfilerTest.php b/tests/util/profiler/ProfilerTest.php index b9426e3..6c01510 100644 --- a/tests/util/profiler/ProfilerTest.php +++ b/tests/util/profiler/ProfilerTest.php @@ -38,8 +38,8 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetInstaceNoDebug() { - Config::set('DEBUG', false); - $this->setExpectedException('GeneralException', 'Need to turn on DEBUG before use.'); + Config::set('PROFILER', false); + $this->setExpectedException('GeneralException', 'Need to turn on PROFILER before use.'); Profiler::getInstance(); } @@ -48,7 +48,7 @@ class ProfilerTest extends PHPUnit_Framework_TestCase */ public function testGetInstance() { - Config::set('DEBUG', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', 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', true); + Config::set('PROFILER', true); $this->getMock('CommandProfiler', array('getType', 'getCommand', 'getElapsed'), array(), 'CommandProfilerMock', false); $profiler = Profiler::getInstance();