/** * Setup the test environment. */ public function setUp() { parent::setUp(); // create an artisan object for calling migrations $artisan = $this->app->make('artisan'); // call migrations specific to our tests, e.g. to create the db $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../tests/src/Stubs/migrations')); // call migrations that will be part of your package, assumes your migrations are in src/migrations // not neccessary if your package doesn't require any migrations to be run for // proper installation $artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations']); // call migrations for packages upon which our package depends, e.g. Cartalyst/Sentry // not necessary if your package doesn't depend on another package that requires // running migrations for proper installation /* uncomment as necessary $artisan->call('migrate', [ '--database' => 'testbench', '--path' => '../vendor/cartalyst/sentry/src/migrations', ]); */ // call migrations that will be part of your package, assumes your migrations are in src/migrations // not neccessary if your package doesn't require any migrations to be run for // proper installation /* uncomment as neccesary $artisan->call('migrate', [ '--database' => 'testbench', '--path' => 'migrations', ]); */ // require_once("src/Drivers/DriverInterface.php"); // require_once("src/Drivers/File.php"); $this->app->bind(DriverInterface::class, FileDriver::class); }
public function setUp() { parent::setUp(); //If AWS environment variables are not set, abort tests if (!$this->hasAwsCredentials()) { $this->markTestIncomplete('No AWS credentials set or incomplete, skipping AWS S3 Driver test suite.'); } $this->refreshDriver(); $this->content = $this->generateRandomContent(); }
public function setUp() { parent::setUp(); $this->refreshDriver(); $this->storedPath = $this->fileStorageDriver->store($this->content); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); $this->extensionGuesser = $this->app->make(ExtensionGuesser::class); }