From 3c3071fb154dd5608d55146fe7b4d0a3d458bc84 Mon Sep 17 00:00:00 2001 From: Anton Grebnev Date: Thu, 6 Oct 2011 19:19:40 +0400 Subject: [PATCH] better coverage --- tests/ConfigTest.php | 1 + tests/LoadTest.php | 4 ++-- tests/RegistryTest.php | 1 + tests/util/AutoloadBuilderTest.php | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php index 278e1c3..4b852e2 100644 --- a/tests/ConfigTest.php +++ b/tests/ConfigTest.php @@ -44,4 +44,5 @@ class ConfigTest extends PHPUnit_Framework_TestCase $new_arr = Config::get(0); $this->assertEquals('ConfigArray', get_class($new_arr)); } + } \ No newline at end of file diff --git a/tests/LoadTest.php b/tests/LoadTest.php index a099384..c03fd96 100644 --- a/tests/LoadTest.php +++ b/tests/LoadTest.php @@ -82,7 +82,7 @@ class LoadTest extends PHPUnit_Framework_TestCase public function testAutoloadGetFilePath() { $autoload = require(self::$file); - $this->assertNotEmpty($autoload['Registry']); + $this->assertNotEmpty(Load::getFilePath('Registry')); } /** @@ -92,7 +92,7 @@ class LoadTest extends PHPUnit_Framework_TestCase public function testAutoloadGetFilePathNullIndex() { $autoload = require(self::$file); - $this->assertNotEmpty($autoload['anton']); + $this->assertNotEmpty(Load::getFilePath('anton')); } public static function tearDownAfterClass() diff --git a/tests/RegistryTest.php b/tests/RegistryTest.php index 66e46db..345a063 100644 --- a/tests/RegistryTest.php +++ b/tests/RegistryTest.php @@ -19,6 +19,7 @@ class RegistryTest extends PHPUnit_Framework_TestCase public function setUp() { + $this->assertFalse(Registry::isRegistered(10)); $this->_registry = Registry::getInstance(); } diff --git a/tests/util/AutoloadBuilderTest.php b/tests/util/AutoloadBuilderTest.php index fb7493a..ce61a7d 100644 --- a/tests/util/AutoloadBuilderTest.php +++ b/tests/util/AutoloadBuilderTest.php @@ -64,7 +64,8 @@ class AutoloadBuilderTest extends PHPUnit_Framework_TestCase $builder->build(); } - + + public function testAutoloadFileExists() { $this->assertFileExists(self::$file);