basePath = dirname(__FILE__) . '/_files/modules'; $this->helper = new Zend_View_Helper_Placeholder_StandaloneContainerTest_Foo(); } /** * Tears down the fixture, for example, close a network connection. * This method is called after a test is executed. * * @return void */ public function tearDown() { unset($this->helper); } public function testViewAccessorWorks() { $view = new Zend_View(); $this->helper->setView($view); $this->assertSame($view, $this->helper->view); } public function testContainersPersistBetweenInstances() { $foo1 = new Zend_View_Helper_Placeholder_StandaloneContainerTest_Foo; $foo1->append('Foo'); $foo1->setSeparator(' - '); $foo2 = new Zend_View_Helper_Placeholder_StandaloneContainerTest_Foo; $foo2->append('Bar'); $test = $foo1->toString(); $this->assertContains('Foo', $test); $this->assertContains(' - ', $test); $this->assertContains('Bar', $test); } } class Zend_View_Helper_Placeholder_StandaloneContainerTest_Foo extends Zend_View_Helper_Placeholder_Container_Standalone { protected $_regKey = 'foo'; } // Call Zend_View_Helper_Placeholder_StandaloneContainerTest::main() if this source file is executed directly. if (PHPUnit_MAIN_METHOD == "Zend_View_Helper_Placeholder_StandaloneContainerTest::main") { Zend_View_Helper_Placeholder_StandaloneContainerTest::main(); }