From 3659cca99ec1c666dca7cf750f4055e94ac8f0cb Mon Sep 17 00:00:00 2001 From: Anton Grebnev Date: Sat, 29 Oct 2011 15:39:19 +0400 Subject: [PATCH] little changes --- tests/ConfigTest.php | 27 ++++++++++++++------------- tests/util/profiler/ProfilerTest.php | 1 - 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 2b2fc8a..b340b95 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -15,23 +15,24 @@ require_once dirname(__FILE__) . '/../Config.php'; class ConfigTest extends PHPUnit_Framework_TestCase { - + private $_instance = null; - + public function setUp() { $this->_instance = Config::getInstance(); } + public function testGetInstance() { $this->assertSame($this->_instance, Config::getInstance()); - + /** * @TODO: Config - class does not instanciate, Registry instead!!! Use late static binding */ $this->assertNotEquals('Config', get_class(Config::getInstance())); } - + /** * @expectedException Exception * @expectedExceptionMessage Configuration variable @@ -39,20 +40,20 @@ class ConfigTest extends PHPUnit_Framework_TestCase public function testArrayAsParam() { $arr = array( - 'one' => 1, - 'two' => 2, - 'three' => 3, - 4 => 'four' - ); - + 'one' => 1, + 'two' => 2, + 'three' => 3, + 4 => 'four' + ); + Config::set(0, $arr); $new_arr = Config::get(0); $this->assertEquals('ConfigArray', get_class($new_arr)); $this->assertEquals('four', $new_arr->offsetGet(4)); $this->assertEquals(1, $new_arr->one); - $this->assertNotEquals(1, $new_arr->offsetGet('two')); - + $this->assertNotEquals(1, $new_arr->offsetGet('two')); + $new_arr->some; } - + } \ No newline at end of file diff --git a/tests/util/profiler/ProfilerTest.php b/tests/util/profiler/ProfilerTest.php index 0ab4253..442d06c 100644 --- a/tests/util/profiler/ProfilerTest.php +++ b/tests/util/profiler/ProfilerTest.php @@ -139,7 +139,6 @@ class ProfilerTest extends PHPUnit_Framework_TestCase $profiler = Profiler::getInstance(); $cmdProfiler = $profiler->profilerCommand('command', 'type'); $result = $profiler->getCli(); - echo $result; $this->assertNotNull($result); }