Exemplo n.º 1
0
 protected function registerLassy()
 {
     $this->app['lassy'] = $this->app->share(function ($app) {
         $config = $app['config'];
         $lassy = new Lassy($config->get('lassy::output_dir'), $app['files']);
         $lassy->addFilter($config->get('lassy::filters'));
         if (false === $config->get('lassy::enabled')) {
             $lassy->disable();
         }
         return $lassy;
     });
 }
Exemplo n.º 2
0
 /**
  * @dataProvider getFilePathProvider
  */
 public function testGetFilePath($pathinfo, $expected)
 {
     $request = m::mock('Illuminate\\Http\\Request');
     $request->shouldReceive('getPathInfo')->once()->andReturn($pathinfo);
     $lassy = new Lassy('', new Illuminate\Filesystem\Filesystem());
     $this->assertEquals($expected, $lassy->getFilePath($request));
 }