Ejemplo n.º 1
0
 public function testStoreSuccessWithRedirectToList()
 {
     $object = new Project();
     $object->id = 1;
     Project::shouldReceive('create')->once()->andReturn($object);
     $input = array('fr.title' => 'test', 'fr.slug' => 'test', 'category_id' => 1, 'tags' => '', 'exit' => true);
     $this->call('POST', 'admin/projects', $input);
     $this->assertRedirectedToRoute('admin.projects.index');
 }
Ejemplo n.º 2
0
 public function boot()
 {
     // Bring in the routes
     require __DIR__ . '/../routes.php';
     // Add dirs
     View::addLocation(__DIR__ . '/../Views');
     Lang::addNamespace('projects', __DIR__ . '/../lang');
     Config::addNamespace('projects', __DIR__ . '/../config');
     // Observers
     ProjectTranslation::observe(new SlugObserver());
     Project::observe(new FileObserver());
 }
Ejemplo n.º 3
0
 public function boot()
 {
     $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.projects');
     $modules = $this->app['config']['typicms']['modules'];
     $this->app['config']->set('typicms.modules', array_merge(['projects' => ['linkable_to_page']], $modules));
     $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'projects');
     $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'projects');
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/projects')], 'views');
     $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations');
     AliasLoader::getInstance()->alias('Projects', 'TypiCMS\\Modules\\Projects\\Facades\\Facade');
     // Observers
     ProjectTranslation::observe(new SlugObserver());
     Project::observe(new FileObserver());
     Project::observe(new TagObserver());
 }