public function setUp() { parent::setUp(); $artisan = $this->app->make('artisan'); $artisan->call('migrate', ['--database' => 'testbench', '--path' => '../tests/migrations']); $this->countQueries(); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); $artisan = $this->app->make('artisan'); $artisan->call('migrate', ['--database' => 'testing', '--path' => '../tests/database/migrations']); $artisan->call('db:seed', ['--database' => 'testing', '--class' => 'TopicTableSeeder']); }
public function setUp() { parent::setUp(); $artisan = $this->app->make('artisan'); $output = new BufferedOutput(); $artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations'], $output); }
public function setUp() { parent::setUp(); //$this->app['cache']->clear(); $this->setUpDatabase($this->app); $this->setUpRoutes($this->app); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/migrations')]); $this->withFactories(__DIR__ . '/factories'); \Cache::flush(); }
public function setUp() { parent::setUp(); $this->queries = new Helpers\SqliteQueries(); $this->migrateDatabase(); $this->seedDatabase(); }
public function setUp() { parent::setUp(); if (File::isDirectory('packages')) { File::deleteDirectory('packages'); } }
/** * Setup the test environment. * * @return array */ public function setup() { parent::setup(); if (getenv("TRAVIS")) { $appName = getenv("KINVEY_APP_NAME"); $appKey = getenv("KINVEY_APP_KEY"); $appSecret = getenv("KINVEY_APP_SECRET"); $masterSecret = getenv("KINVEY_MASTER_SECRET"); $testMail = getenv("TEST_MAIL"); } else { extract(include __DIR__ . '/TestConfig.php'); } // Kinvey client configuration. $this->app['config']->set('kinvey::appName', $appName); $this->app['config']->set('kinvey::appKey', $appKey); $this->app['config']->set('kinvey::appSecret', $appSecret); $this->app['config']->set('kinvey::masterSecret', $masterSecret); // Test mail account. $this->app['config']->set('kinvey::testMail', $testMail); // Eloquent user model. $authConfig = $this->app['config']['auth']; $authConfig['model'] = 'GovTribe\\LaravelKinvey\\Database\\Eloquent\\User'; $this->app['config']->set('auth', $authConfig); // Default database $this->app['config']->set('database.connections.kinvey', array('driver' => 'kinvey')); $this->app['config']->set('database.default', 'kinvey'); // Set the auth mode to admin. Kinvey::setAuthMode('admin'); }
public function setUp() { parent::setUp(); require_once __DIR__ . "/../../src/routes.php"; $this->useMailPretend(); $this->useNullLogger(); }
public function tearDown() { parent::tearDown(); if (file_exists($this->testImage)) { unlink($this->testImage); } }
/** * Clean up the testing environment before the next test. * * @return void */ public function tearDown() { parent::tearDown(); unset($this->engine); unset($this->ourConfigPath); unset($this->bridge); }
public function setUp() { parent::setUp(); $this->app->bindShared('path.base', function () { return BASE_PATH; }); }
/** * Tear down test. * * @return void */ public function tearDown() { parent::tearDown(); unset($this->dilemma); unset($this->resolution); unset($this->map); }
public function setUp() { parent::setUp(); $this->bookRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\Resource\\BookRepository'); $this->org = Organization::register(new Name('VBS De Klimtoren'), new DomainName('klimtoren.be')); $this->spec = new IsbnIsUnique($this->bookRepo); }
/** * Setup the test environment. * * @return void */ public function setUp() { parent::setUp(); $this->model = Mockery::mock(Model::class)->makePartial(); $this->repository = Mockery::mock(Repository::class)->makePartial(); $this->repository->setupRepository($this->model); }
public function setUp() { parent::setUp(); // setup Slack API $token = getenv('slack_token'); $this->slackApi = new SlackApi($token); }
/** * @param \Ipunkt\Simpleauth\Repositories\EloquentRepository $repository */ public function setUp() { parent::setUp(); $this->repository = new EloquentRepository(); $artisan = $this->app->make('artisan'); $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../src/migrations')); }
public function setUp() { parent::setUp(); $this->groupRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\Identity\\GroupRepository'); $this->kindRepo = m::mock('Bakgat\\Notos\\Domain\\Model\\KindRepository'); $this->groupService = new GroupService($this->kindRepo, $this->groupRepo); }
public function setUp() { parent::setUp(); $this->queueCheckerJob = new QueueCheckerJob(); $this->taskMock = m::mock(); $this->taskMock->shouldReceive('delete'); }
/** * Get application paths. Use the preset from the Orchestral package but redefine the storage path * * @return array */ protected function getApplicationPaths() { $basePath = __DIR__ . '/../..'; $orchestralPaths = parent::getApplicationPaths(); $orchestralPaths['storage'] = "{$basePath}/tests/storage"; return $orchestralPaths; }
protected function getApplicationProviders($app) { $providers = parent::getApplicationProviders($app); $viewProviderPosition = array_search(\Illuminate\View\ViewServiceProvider::class, $providers); array_splice($providers, $viewProviderPosition, 1, \Ree\Theme\ViewServiceProvider::class); return $providers; }
public function setUp() { parent::setUp(); $this->setupMocks(); $this->bookService = new BookService($this->bookRepo, $this->orgRepo); $this->setupTestData(); }
public function setUp() { parent::setUp(); $this->app->instance('path.public', __DIR__ . '/fixture'); Image::deleteManipulated($this->imagePath); $this->imageSize = getimagesize(public_path() . $this->imagePath); }
public function tearDown() { $customPath = $this->app['path.public'] . '/custom'; $this->app['config']->set('image.write_path', $customPath); Image::deleteManipulated($this->imagePath); parent::tearDown(); }
public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/database')]); // @TODO refactor fixtures, this schema sucks so much :( \DB::table('person')->delete(); \DB::table('son')->delete(); \DB::table('roles')->delete(); \DB::table('person')->insert(['id' => 1, 'name' => 'Homer']); \DB::table('person')->insert(['id' => 2, 'name' => 'Marge']); \DB::table('person')->insert(['id' => 3, 'name' => 'Apu']); \DB::table('son')->insert(['pid' => 1, 'name' => 'Bart']); \DB::table('son')->insert(['pid' => 1, 'name' => 'Lisa']); \DB::table('son')->insert(['pid' => 1, 'name' => 'Maggie']); \DB::table('son')->insert(['pid' => 2, 'name' => 'Lisa']); \DB::table('roles')->insert(['id' => 1, 'name' => 'Father']); \DB::table('roles')->insert(['id' => 2, 'name' => 'Mother']); \DB::table('roles')->insert(['id' => 3, 'name' => 'Vendor']); \DB::table('roles')->insert(['id' => 4, 'name' => 'Children']); \DB::table('roles')->insert(['id' => 5, 'name' => 'Nuclear Safety Inspector']); \DB::table('roles')->insert(['id' => 6, 'name' => 'Ambulance Driver']); \DB::table('roles')->insert(['id' => 7, 'name' => 'Food Critic']); \DB::table('person_roles')->insert(['pid' => 1, 'rid' => 1]); \DB::table('person_roles')->insert(['pid' => 2, 'rid' => 2]); \DB::table('person_roles')->insert(['pid' => 3, 'rid' => 3]); }
/** * Set up the tests. */ public function setUp() { parent::setUp(); $this->translator = $this->app['translator']; $this->detector = new LanguageDetector($this->translator); $this->translator->setLocale('fr'); }
public function setUp() { parent::setUp(); \Config::set('database.default', 'sqlite'); \Config::set('database.connections', ['sqlite' => array('driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '')]); $this->createDatabase(); }
public function setUp() { parent::setUp(); $artisan = $this->app->make('artisan'); $this->resetDatabase($artisan); $this->countQueries(); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); // uncomment to enable route filters if your package defines routes with filters // $this->app['router']->enableFilters(); // create an artisan object for calling migrations //$artisan = $this->app->make('artisan'); // 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', ]); */ // call migrations specific to our tests, e.g. to seed the db /*$artisan->call('migrate', array( '--database' => 'testbench', '--path' => '../tests/migrations', ));*/ }
public function setUp() { parent::setUp(); $this->setupMocks(); $this->userService = new UserService($this->userRepo, $this->orgRepo, $this->roleRepo, $this->userRoleRepo, $this->hasher); $this->setupTestData(); }