From 368bdd6194af7dfc20f09f77d1c45e6ace0ecb16 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 16 Aug 2006 01:53:23 +0000 Subject: [PATCH] Screw you PHPUnit. Switching to SimpleTest --- PHPUnit/AllTests.php | 25 ++++++++----------------- PHPUnit/LoaderTest.php | 22 +++++++++------------- 2 files changed, 17 insertions(+), 30 deletions(-) diff --git a/PHPUnit/AllTests.php b/PHPUnit/AllTests.php index ecd5ddd..37843fe 100644 --- a/PHPUnit/AllTests.php +++ b/PHPUnit/AllTests.php @@ -1,25 +1,16 @@ addListener(new ISI_PHPUnit2_Output_HTML_Listener); -$suite = new PHPUnit2_Framework_TestSuite; +$test->addTestFile('LoaderTest.php'); -// load tests -$suite->addTestFile('LoaderTest.php'); - -// run all the tests -$suite->run($result); +// run +$test->run(new HtmlReporter); ?> \ No newline at end of file diff --git a/PHPUnit/LoaderTest.php b/PHPUnit/LoaderTest.php index 2875f68..16facb6 100644 --- a/PHPUnit/LoaderTest.php +++ b/PHPUnit/LoaderTest.php @@ -1,9 +1,5 @@ instance = BSLoader::NewRegister(); - $this->assertEquals(get_class($this->instance), 'BSRegister'); + $this->assertEqual(get_class($this->instance), 'BSRegister'); } // ################################################################### @@ -42,8 +38,8 @@ class LoaderTest extends PHPUnit2_Framework_TestCase */ public function testGetAllRegisters() { - $this->assertType(BSLoader::GetAllRegisters(), 'array', 'Register array is not an array'); - $this->assertEquals(sizeof(BSLoader::GetAllRegisters()), 1, 'Register array is wrong size'); + $this->assertIsA(BSLoader::GetAllRegisters(), 'array', 'Register array is not an array'); + $this->assertEqual(sizeof(BSLoader::GetAllRegisters()), 1, 'Register array is wrong size'); } // ################################################################### @@ -54,7 +50,7 @@ class LoaderTest extends PHPUnit2_Framework_TestCase { BSLoader::SetRegister($this->instance); - $this->assertSame(BSLoader::GetRegister(), $this->instance); + $this->assertReference(BSLoader::GetRegister(), $this->instance); } // ################################################################### @@ -66,9 +62,9 @@ class LoaderTest extends PHPUnit2_Framework_TestCase { BSLoader::NewRegister(); - $this->assertEquals(get_class(BSLoader::GetRegister(1)), 'BSRegister', 'Failed to get arbitrary register'); - $this->assertEquals(sizeof(BSLoader::GetAllRegisters()), 2, 'Sizeof register array is wrong'); - $this->assertSame($this->instance, BSLoader::GetRegister(), 'Main register does not match instance'); + $this->assertEqual(get_class(BSLoader::GetRegister(1)), 'BSRegister', 'Failed to get arbitrary register'); + $this->assertEqual(sizeof(BSLoader::GetAllRegisters()), 2, 'Sizeof register array is wrong'); + $this->assertReference($this->instance, BSLoader::GetRegister(), 'Main register does not match instance'); } // ################################################################### @@ -77,7 +73,7 @@ class LoaderTest extends PHPUnit2_Framework_TestCase */ public function testLoadModule() { - $this->assertEquals(get_class(BSLoader::LoadModule('Input')), 'BSInput'); + $this->assertEqual(get_class(BSLoader::LoadModule('Input')), 'BSInput'); } } -- 2.43.5