Пример #1
0
 /**
  * @covers Button::setAction
  */
 public function testSetAction()
 {
     $this->button = new \Button("button");
     $action = "delete";
     $resultButton = $this->button->setAction($action);
     $actual = $resultButton->getHref()->get("_ac");
     $this->assertEquals($action, $actual);
 }
Пример #2
0
 /**
  *
  * @param String $title
  * @param String $action Action name
  * @return Button
  */
 public function button($title, $action = null)
 {
     $button = new Button($title);
     if (isset($action)) {
         $button->setAction($action);
     }
     return $button;
 }