Answer the question
In order to leave comments, you need to log in
How to test Zend Framework 2 app with Paginator using PHPUnit?
Greetings! When creating a test for the application, I encountered an error:
Argument 1 passed to Zend\Paginator\Adapter\Iterator::__construct() must implement interface Iterator, array given
$albums = $this->getAlbumTable()->fetchAll( $select );
$itemsPerPage = 2;
// Ошибка возникает в этой строке
$paginator = new Paginator( new paginatorIterator( $albums ) );
$paginator->setCurrentPageNumber( $page )
->setItemCountPerPage( $itemsPerPage )
->setPageRange( 7 );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question