public function index()
 {
     $files = $this->storage->paginate(['parentId' => null]);
     return Presenter::make('storage.index', compact('files'));
 }
Пример #2
0
 public function testPaginate()
 {
     list($handler, $repo, $auth, $keygen) = $this->getMocks();
     $instance = new Storage($handler, $repo, $auth, $keygen);
     $paginator = m::mock('Illuminate\\Contracts\\Pagination\\LengthAwarePaginator');
     $repo->shouldReceive('paginate')->once()->with(['var' => 'foo'], 10)->andReturn($paginator);
     $files = $instance->paginate(['var' => 'foo'], 10);
     $this->assertInstanceOf('Illuminate\\Contracts\\Pagination\\LengthAwarePaginator', $files);
 }