Пример #1
0
 /**
  * @dataProvider dataSetLink
  * @param string $link
  * @param string $type
  */
 public function testSetLink($link, $type)
 {
     $this->assertSame('', $this->action->getLink());
     $this->assertSame($this->action, $this->action->setLink($link, $type));
     $this->assertSame($link, $this->action->getLink());
     $this->assertSame($type, $this->action->getRequestType());
 }
 /**
  * @param IAction $action
  * @return array
  */
 protected function actionToArray(IAction $action)
 {
     return ['label' => $action->getParsedLabel(), 'link' => $action->getLink(), 'type' => $action->getRequestType(), 'icon' => $action->getIcon()];
 }