Beispiel #1
0
 public function testCreate()
 {
     $type = '1';
     $data = ['data2', 'data3'];
     $this->objectManagerMock->expects($this->once())->method('create')->with($type, $data);
     $this->actionFactory->create($type, $data);
 }
Beispiel #2
0
 /**
  * @param array $arr
  * @return $this
  */
 public function loadArray(array $arr)
 {
     if (!empty($arr['actions']) && is_array($arr['actions'])) {
         foreach ($arr['actions'] as $actArr) {
             if (empty($actArr['type'])) {
                 continue;
             }
             $action = $this->_actionFactory->create($actArr['type']);
             $action->loadArray($actArr);
             $this->addAction($action);
         }
     }
     return $this;
 }