Пример #1
0
 public function testStoreSuccessWithRedirectToList()
 {
     $object = new File();
     $object->id = 1;
     File::shouldReceive('create')->once()->andReturn($object);
     $input = array('exit' => true);
     $this->call('POST', 'admin/files', $input);
     $this->assertRedirectedToRoute('admin.files.index');
 }
Пример #2
0
 public function boot()
 {
     // Bring in the routes
     require __DIR__ . '/../routes.php';
     // Add dirs
     View::addLocation(__DIR__ . '/../Views');
     Lang::addNamespace('files', __DIR__ . '/../lang');
     Config::addNamespace('files', __DIR__ . '/../config');
     // Observers
     File::observe(new FileObserver());
 }
Пример #3
0
 public function boot()
 {
     $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.files');
     $modules = $this->app['config']['typicms']['modules'];
     $this->app['config']->set('typicms.modules', array_merge(['files' => []], $modules));
     $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'files');
     $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'files');
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/files')], 'views');
     $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations');
     AliasLoader::getInstance()->alias('Files', 'TypiCMS\\Modules\\Files\\Facades\\Facade');
     // Observers
     File::observe(new FileObserver());
 }