input = BSApp::$input = new BSInput(); TestInstallerFixture::$rig = $this; } private function _loadClass() { ob_start(); $this->fixture = new TestInstallerFixture('InstallerTest.php'); $data = ob_get_contents(); ob_clean(); ob_end_clean(); return $data; } public function stepCheck($step) { $this->assertEquals($this->input->in['step'], $step); } public function testWelcome() { $this->input->in['step'] = 0; $data = $this->_loadClass(); $this->assertTrue(strpos($data, 'This is a welcome page.') !== false); } public function testStep1() { $this->input->in['step'] = 1; $data = $this->_loadClass(); $this->assertTrue(strpos($data, '') !== false); } public function testLastStep() { $this->input->in['step'] = 2; $data = $this->_loadClass(); $this->assertTrue(strpos($data, '') !== false); } } class TestInstallerFixture extends BSInstaller { public static $rig; protected function _pageTitle() { return 'Test Installer'; } protected function _finalLink() { return 'FINAL LINK'; } protected function _welcomePage() { echo 'This is a welcome page.'; } public function step1() { self::$rig->stepCheck(1); } public function step2() { self::$rig->stepCheck(2); } } ?>