Ejemplo n.º 1
0
 public function testSetGet()
 {
     $controller = $this->controller->reveal();
     $action_form = new Ethna_Mock_ActionForm($controller);
     $this->assertNull($action_form->get("name"), "action form should return correct value");
     $action_form->set("name", "chobie");
     $this->assertEquals("chobie", $action_form->get("name"), "action form should return correct value");
 }
Ejemplo n.º 2
0
 public function testPerform()
 {
     $this->controller->getActionClassName("test")->willReturn("Ethna_Mock_ActionClass");
     $backend = new Ethna_Mock_Backend($this->controller->reveal());
     $this->assertEquals("index", $backend->perform("test"), "backend returns correct forward name");
 }
Ejemplo n.º 3
0
 /**
  * check Ethna_ActionClass::prepare requirements
  */
 public function testPrepare()
 {
     $controller = $this->controller->reveal();
     $action = new Ethna_Mock_ActionClass($controller->getBackend());
     $this->assertNull($action->prepare(), "should return null");
 }