From 6dc2ea838e5e900aebe133582370d3c778e0d467 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 20 Aug 2007 09:43:24 -0700 Subject: [PATCH] Removing the old ReigsterTest.php * UnitTest/RegisterTest.php: Removed --- UnitTest/RegisterTest.php | 138 -------------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 UnitTest/RegisterTest.php diff --git a/UnitTest/RegisterTest.php b/UnitTest/RegisterTest.php deleted file mode 100644 index a695270..0000000 --- a/UnitTest/RegisterTest.php +++ /dev/null @@ -1,138 +0,0 @@ -assertTrue(BSRegister::LoadModule('Input') instanceof BSInput); - } - - public function testLoadBadModule() - { - BSRegister::LoadModule('nonExistentModule'); - $this->assertError(); - } - - public function testSetGetAppPath() - { - BSRegister::SetAppPath(getcwd()); - $this->assertEqual(getcwd() . DIRECTORY_SEPARATOR, BSRegister::GetAppPath()); - } - - public function testSetGetAppVersion() - { - BSRegister::SetAppVersion('1.0-test'); - $this->assertEqual('1.0-test', BSRegister::GetAppVersion()); - } - - public function testSetGetApplication() - { - BSRegister::SetApplication('ISSO Tests'); - $this->assertEqual('ISSO Tests', BSRegister::GetApplication()); - } - - public function testSetGetWebPath() - { - $path = DIRECTORY_SEPARATOR . 'Server' . DIRECTORY_SEPARATOR . 'htdocs' . DIRECTORY_SEPARATOR . 'ISSO'; - BSRegister::SetWebPath($path); - $this->assertEqual($path . DIRECTORY_SEPARATOR, BSRegister::GetWebPath()); - } - - public function testSetGetDebug() - { - BSRegister::SetDebug(true); - $this->assertIdentical(true, BSRegister::GetDebug()); - } - - public function testDebugList() - { - $this->assertEqual('', BSRegister::GetDebugList()); - - BSRegister::Debug('dbg'); - $this->assertEqual('', BSRegister::GetDebugList()); - } - - public function testRegisterValue() - { - BSRegister::Register('someKey', 'someValue'); - - $registry = BSRegister::GetAll(); - $this->assertEqual($registry['someKey'], 'someValue'); - } - - public function testGetAll() - { - BSRegister::Register('test', 1); - $this->assertIsA(BSRegister::GetAll(), 'array'); - $this->assertEqual(sizeof(BSRegister::GetAll()), 2); - } - - public function testOverWriteRegister() - { - BSRegister::Register('valueToOverWrite', 1); - BSRegister::Register('valueToOverWrite', 2); - $this->assertError(); - $this->assertEqual(1, BSRegister::Get('valueToOverWrite')); - } - - public function testGet() - { - BSRegister::Register('testGet', 123); - $this->assertEqual(123, BSRegister::Get('testGet')); - } - - public function testUnregister() - { - BSRegister::Register('testUnregister', 1); - BSRegister::Unregister('testUnregister'); - BSRegister::Register('testUnregister', 2); - $this->assertNoErrors(); - $this->assertEqual(2, BSRegister::Get('testUnregister')); - } - - public function testGetNoExist() - { - BSRegister::Get('doesNotExist'); - $this->assertError(); - } - - public function testUnregisterNoExist() - { - BSRegister::Unregister('keyThatWontExist'); - $this->assertError(); - } - - public function testGetType() - { - $input = BSRegister::LoadModule('Input'); - BSRegister::Register('input', $input); - $this->assertReference($input, BSRegister::GetType('Input')); - - $this->assertEqual(null, BSRegister::GetType('Date')); - } - - public function testRequiredModules() - { - BSRegister::RequiredModules(array('Input')); - $this->assertNoErrors(); - - BSRegister::RequiredModules(array('Input', 'Db')); - $this->assertError(); - - BSRegister::RequiredModules(array('Date')); - $this->assertError(); - } -} - -?> \ No newline at end of file -- 2.43.5