/** * Tests Frapi_Action->setActionParams() */ public function testSetActionParams() { $actionParams = array('one' => 'one', 1 => 'two'); $action = Frapi_Action::getInstance('Testing1'); $action->setActionParams($actionParams); $params = $action->getParams(); $this->assertEquals($actionParams, $params); }
/** * Get Action Instance * * Get an install of the context action * by it's type. * * This method will use the Rules to make * sure that the type is an allowed type. * * @see Frapi_Action::getInstance($type) * @param string $type The type of action to get. * * @return mixed Action Instance of the ActionType * or false if the type is not valid */ protected function getActionInstance($type) { $this->actionContext = Frapi_Action::getInstance($type); return $this->actionContext; }
public function testGetInstanceActionDoesNotExist() { $this->setExpectedException('Frapi_Action_Exception'); $action = Frapi_Action::getInstance('ActionDoesNotExist'); }