server/src/tests/Controllers/DocumentListControllerTest.php
changeset 339 766af1228b05
parent 326 226d5b17a119
child 537 d2e6ee099125
equal deleted inserted replaced
338:4a3899b6a7ed 339:766af1228b05
   102         parent::tearDown();
   102         parent::tearDown();
   103     }
   103     }
   104 
   104 
   105     public function testIndex() {
   105     public function testIndex() {
   106         $this->documentRepository
   106         $this->documentRepository
   107             ->shouldReceive('paginateAll')
   107             ->shouldReceive('paginate')
   108             ->once()
   108             ->once()
   109             ->andReturn(
   109             ->andReturn(
   110                 new LengthAwarePaginator([], 0, 10, 1, [
   110                 new LengthAwarePaginator([], 0, 10, 1, [
   111                     'path' => '',
   111                     'path' => '',
   112                     'pageName' => 'page',
   112                     'pageName' => config('corpusparole.pagination_page_param'),
   113                 ]));
   113                 ]));
   114 
   114 
   115         $response = $this->call('GET', '/bo/docs');
   115         $response = $this->call('GET', '/bo/docs');
   116 
   116 
   117         $this->assertResponseOk($response);
   117         $this->assertResponseOk($response);