Since: 3.0.0
Author: Henry Ruhs
Author: Balázs Szilágyi
Inheritance: extends ViewAbstract
 /**
  * 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);
 }
Exemple #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);
 }