public function testCannotStackActionIfNoRequestAvailable() { $helper = new Zend_Controller_Action_Helper_ActionStack(); $plugin = $this->front->getPlugin('Zend_Controller_Plugin_ActionStack'); $helper->direct('baz', 'bar', 'foo'); $next = $plugin->popStack(); $this->assertTrue($next instanceof Zend_Controller_Request_Abstract); $this->assertEquals('foo', $next->getModuleName()); $this->assertEquals('bar', $next->getControllerName()); $this->assertEquals('baz', $next->getActionName()); $this->assertFalse($next->isDispatched()); }
public function testDirectProxiesToActionToStack() { $front = Zend_Controller_Front::getInstance(); $helper = new Zend_Controller_Action_Helper_ActionStack(); $plugin = $front->getPlugin('Zend_Controller_Plugin_ActionStack'); $helper->direct('baz', 'bar', 'foo'); $next = $plugin->popStack(); $this->assertTrue($next instanceof Zend_Controller_Request_Abstract); $this->assertEquals('foo', $next->getModuleName()); $this->assertEquals('bar', $next->getControllerName()); $this->assertEquals('baz', $next->getActionName()); $this->assertFalse($next->isDispatched()); }