示例#1
0
 /**
  * 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);
 }
示例#2
0
文件: Api.php 项目: crlang44/frapi
 /**
  * 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;
 }
示例#3
0
 public function testGetInstanceActionDoesNotExist()
 {
     $this->setExpectedException('Frapi_Action_Exception');
     $action = Frapi_Action::getInstance('ActionDoesNotExist');
 }