public function testStoreSuccessWithRedirectToList() { $object = new Gallery(); $object->id = 1; Gallery::shouldReceive('create')->once()->andReturn($object); $input = ['name' => 'test', 'exit' => true]; $this->call('POST', 'admin/galleries', $input); $this->assertRedirectedToRoute('admin.galleries.index'); }
public function boot() { $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.galleries'); $modules = $this->app['config']['typicms']['modules']; $this->app['config']->set('typicms.modules', array_merge(['galleries' => ['linkable_to_page']], $modules)); $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'galleries'); $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'galleries'); $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/galleries')], 'views'); $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations'); AliasLoader::getInstance()->alias('Galleries', 'TypiCMS\\Modules\\Galleries\\Facades\\Facade'); // Observers GalleryTranslation::observe(new SlugObserver()); Gallery::observe(new FileObserver()); }