Esempio n. 1
0
 /**
  * Run after the test.
  *
  * @return void
  */
 public function tearDown()
 {
     if (class_exists('Mockery')) {
         Mockery::close();
     }
     Container::getInstance()->flush();
 }
Esempio n. 2
0
 function app($make = null, $parameters = [])
 {
     if (is_null($make)) {
         return Container::getInstance();
     }
     return Container::getInstance()->make($make, $parameters);
 }
Esempio n. 3
0
 /**
  * Load all the factory config.
  *
  * @todo Add validation to the existence of the path.
  *
  * @before
  * @return void
  */
 protected function loadModelFactories()
 {
     $container = Container::getInstance();
     $factory = $container->make(EloquentFactory::class);
     $factory_path = $container->basePath('database/factories');
     $factory->load($factory_path);
     $container->instance(EloquentFactory::class, $factory);
 }
Esempio n. 4
0
 /**
  * Scan the directoies for the migration files.
  *
  * @return Collection
  */
 private function getMigrationFiles()
 {
     $filesystem = new Filesystem();
     $migration_path = Container::getInstance()->basePath('database/migrations');
     return collect($filesystem->files($migration_path));
 }