С версии: 3.0.0
Автор: Henry Ruhs
Автор: Balázs Szilágyi
Наследование: extends ViewAbstract
Пример #1
0
 /**
  * testRender
  *
  * @since 3.0.0
  *
  * @param array $searchArray
  * @param array $expectArray
  *
  * @dataProvider providerRender
  */
 public function testRender($searchArray = [], $expectArray = [])
 {
     /* setup */
     $resultList = new View\ResultList($this->_registry, $this->_language);
     $controllerSearch = new Controller\Search($this->_registry, $this->_language, $this->_request);
     $resultArray = $this->callMethod($controllerSearch, '_search', [$searchArray]);
     /* actual */
     $actualArray = $resultList->render($resultArray);
     /* compare */
     $this->assertEquals($expectArray, $actualArray);
 }
Пример #2
0
 /**
  * render the result
  *
  * @since 3.0.0
  *
  * @param array $resultArray array of the result
  *
  * @return string
  */
 protected function _renderResult($resultArray = [])
 {
     $searchList = new View\ResultList($this->_registry, $this->_language);
     return $searchList->render($resultArray);
 }