/**
  * Register request provider.
  *
  * @return void
  */
 protected function registerIlluminateRequestProvider()
 {
     $this->app['datagrid.request'] = $this->app->share(function ($app) {
         $config = $app['config']->get('cartalyst.data-grid');
         $requestProvider = new Provider($app['request'], null, null, $app['view']);
         $requestProvider->setDefaultMethod($config['method']);
         $requestProvider->setDefaultThreshold($config['threshold']);
         $requestProvider->setDefaultThrottle($config['throttle']);
         return $requestProvider;
     });
 }
Пример #2
0
 /**
  * @expectedException Exception
  */
 public function testDownloadPdfException()
 {
     $provider = new Provider(m::mock('Symfony\\Component\\HttpFoundation\\Request'), m::mock('Symfony\\Component\\HttpFoundation\\Response'), null, m::mock('NativeEnvironment'));
     $provider->downloadPdf(array(array('foo' => 'bar')), 'cartalyst/data-gird::pdf');
 }