public function testStoreSuccessWithRedirectToList()
 {
     $object = new Seminar();
     $object->id = 1;
     Seminar::shouldReceive('create')->once()->andReturn($object);
     $input = array('date' => '2014-03-10', 'exit' => true);
     $this->call('POST', 'admin/seminars', $input);
     $this->assertRedirectedToRoute('admin.seminars.index');
 }
Ejemplo n.º 2
0
 public function boot()
 {
     $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.seminars');
     $modules = $this->app['config']['typicms']['modules'];
     $this->app['config']->set('typicms.modules', array_merge(['seminars' => ['linkable_to_page']], $modules));
     $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'seminars');
     $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'seminars');
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/seminars')], 'views');
     $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations');
     AliasLoader::getInstance()->alias('Seminars', 'TypiCMS\\Modules\\Seminars\\Facades\\Facade');
     // Observers
     SeminarTranslation::observe(new SlugObserver());
     Seminar::observe(new FileObserver());
 }