/** * Setup our shit */ public function setUp() { parent::setUp(); $this->products = \Mockery::mock('Davzie\\ProductCatalog\\Product'); $this->categories = \Mockery::mock('Davzie\\ProductCatalog\\Category'); $this->collections = \Mockery::mock('Davzie\\ProductCatalog\\Collection'); }
public function setUp() { parent::setUp(); Eloquent::unguard(); $this->faker = Faker\Factory::create(); $db = new DB(); $db->addConnection(['driver' => 'sqlite', 'database' => ':memory:']); $db->bootEloquent(); $db->setAsGlobal(); $this->schema()->create('users', function ($table) { $table->increments('id'); $table->string('email'); $table->string('name'); $table->string('billing_id')->nullable(); $table->text('billing_cards')->nullable(); $table->text('billing_discounts')->nullable(); $table->tinyInteger('billing_active')->default(0); $table->string('billing_subscription')->nullable(); $table->tinyInteger('billing_free')->default(0); $table->string('billing_plan', 25)->nullable(); $table->integer('billing_amount')->default(0); $table->string('billing_interval')->nullable(); $table->integer('billing_quantity')->default(0); $table->string('billing_card')->nullable(); $table->timestamp('billing_trial_ends_at')->nullable(); $table->timestamp('billing_subscription_ends_at')->nullable(); $table->text('billing_subscription_discounts')->nullable(); $table->timestamps(); }); }
public function setUp() { parent::setUp(); $this->app['config']->set('database.default', 'sqlite'); $this->app['config']->set('database.connections.sqlite.database', ':memory:'); $this->migrate(); }
public function setUp() { parent::setUp(); if ($this->useDatabase) { $this->setUpDb(); } }
public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testbench', '--path' => '../tests/migrations']); for ($i = 1; $i <= 30; ++$i) { $entities[$i] = new SortableEntity(); $entities[$i]->save(); } $entity = new M2mEntity(); $entity->save(); $relatedEntities = []; for ($i = 1; $i <= 30; ++$i) { $relatedEntity = new M2mRelatedEntity(); $entity->relatedEntities()->save($relatedEntity); $relatedEntities[$i] = $relatedEntity; } $entity = new M2mEntity(); $entity->save(); $relatedEntities = []; for ($i = 1; $i <= 30; ++$i) { $relatedEntity = new M2mRelatedEntity(); $entity->relatedEntities()->save($relatedEntity); $relatedEntities[$i] = $relatedEntity; } }
public function setUp() { parent::setUp(); $this->sitemap = $this->app->make('Cviebrock\\LaravelNewsSitemap\\NewsSitemap'); $defaults = ['publication' => ['name' => 'Test News Site', 'language' => 'en'], 'access' => null, 'genres' => null, 'keywords' => [], 'stock_tickers' => []]; $this->sitemap->setDefaults($defaults); }
public function setUp() { parent::setUp(); $artisan = $this->app->make('Illuminate\\Contracts\\Console\\Kernel'); $this->app['path.database'] = __DIR__; $artisan->call('migrate', ['--database' => 'testbench']); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); $this->setMigrations(); $this->setFactory(); // dump(Application::VERSION); }
public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../src/migrations')]); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/migrations')]); $administrator = \SleepingOwl\AdminAuth\Entities\Administrator::create(['username' => 'admin', 'password' => 'admin', 'name' => 'admin']); AdminAuth::login($administrator); }
public function tearDown() { if (file_exists($this->jsonDocsFile())) { unlink($this->jsonDocsFile()); rmdir(config('l5-swagger.paths.docs')); } parent::tearDown(); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); // call migrations specific to our tests, e.g. to seed the db // the path option should be relative to the 'path.database' // path unless `--path` option is available. $this->artisan('migrate:refresh', ['--database' => 'testing', '--realpath' => realpath(__DIR__ . '/migrations')]); }
public function setUp() { parent::setUp(); $this->withFactories(__DIR__ . '/../src/Models/Factories'); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../src/Migrations')]); $this->withoutMiddleware(); $this->withoutEvents(); }
public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testing', '--realpath' => realpath(__DIR__ . '/../src/database/migrations')]); $this->user = new User(); $this->user->name = 'Marcel'; $this->user->save(); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); $this->withFactories(__DIR__ . '/../src/Models/Factories'); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../src/Migrations')]); $this->artisan('vendor:publish', ['--provider' => 'Yab\\Quarx\\QuarxProvider', '--force' => true]); $this->withoutMiddleware(); $this->withoutEvents(); }
/** * Setup the test environment. */ public function setUp() { parent::setup(); $migrationsPath = realpath('test/database/migrations'); $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => $migrationsPath]); $this->testData = ['email' => '*****@*****.**', 'password' => '$2y$10$tDy/6LDmIyIdCwdhlMWOR.a5.QWSxugr5eIBQqX23UGrJ7MrAx5j.']; $model = new Model(); $this->repository = new ModelRepository($model); }
public function setUp() { parent::setUp(); $this->sessionKey = "test_session"; $this->session = m::mock('\\Illuminate\\Session\\Store'); $this->config = m::mock('\\Illuminate\\Config\\Repository'); $this->app['view']->addNamespace('alerts', realpath(dirname(__FILE__)) . '/../src/views'); $this->alertMessages = new \JCoded\Alerts\AlertMessages($this->session, $this->config, $this->app['router'], $this->app['view']); }
/** * Setup the test functions with larabuster */ public function setUp() { parent::setUp(); $this->model = new \EloquentModelStub(); $this->model->cacheBuster = true; $this->model->cacheTag = 'test.'; $this->model->cacheIdentifier = 'id'; $this->model->id = 1; $this->larabuster = new \LukePOLO\LaraBuster\Listeners\LaraBusterListener(); }
public function setUp() { parent::setUp(); $this->app['config']->set('database.default', 'sqlite'); $this->app['config']->set('database.connections.sqlite.database', ':memory:'); //read from the tests/config file. $config = (require 'config/cos_processor_test.php'); $this->app['config']->set('cos_processor', ['hsbc_example' => $config['hsbc_example'], 'uob_example' => $config['uob_example']]); $this->migrate(); }
public function tearDown() { parent::tearDown(); m::close(); unlink(__DIR__ . '/themes/default/hello.php'); rmdir(__DIR__ . '/themes/default'); rmdir(__DIR__ . '/themes'); unlink(__DIR__ . '/views/login.php'); rmdir(__DIR__ . '/views'); }
/** * */ public function setUp() { parent::setUp(); $this->artisan('migrate', ['--database' => 'testing', '--realpath' => realpath(__DIR__ . '/../src/database/migrations')]); $this->user = new User(); $this->user->name = 'Marcel'; $this->user->save(); $this->team = TeamworkTeam::create(['name' => 'Test-Team']); $this->user->attachTeam($this->team); }
public function setUp() { parent::setUp(); $this->config = app('Illuminate\\Config\\Repository'); $this->url = app('Illuminate\\Routing\\UrlGenerator'); $this->config->set('app.locale', 'en'); $this->config->set('linguist.default', 'en'); $this->config->set('linguist.locales', ['en', 'fr', 'et']); $this->url->forceRootUrl('http://keevitaja.com'); }
public function setUp() { parent::setUp(); // reset configs Facade::clearResolvedInstance('reactjs'); $this->app['config']->set('basepath', ''); $this->app['config']->set('react_src', ''); $this->app['config']->set('src_files', []); $this->app['config']->set('react_prefix', ''); $this->app['config']->set('components_prefix', ''); }
public function setUp() { parent::setUp(); $this->worker = Mockery::mock('designpond\\newsletter\\Newsletter\\Worker\\MailjetServiceInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Worker\\MailjetServiceInterface', $this->worker); $this->subscription = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface', $this->subscription); $this->newsletter = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface', $this->newsletter); $this->withFactories(dirname(__DIR__) . '/newsletter/factories'); }
/** * Setup the test environment. */ public function setUp() { parent::setUp(); // Create an artisan object for calling migrations $artisan = $this->app->make('Illuminate\\Contracts\\Console\\Kernel'); // Call migrations $artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations']); // Call migrations specific to our tests $artisan->call('migrate', array('--database' => 'testbench', '--path' => '../tests/migrations')); // Call seeding Artisan::call('db:seed', ['--class' => 'MessageBoardSeeder']); }
public function setUp() { parent::setUp(); // Add some experiments. Config::set('ab::experiments', ['a', 'b', 'c']); Config::set('ab::goals', ['register', 'buy', 'contact']); // Make sure we're working in memory. Config::set('ab::connection', 'sqlite'); Config::set('database.default', 'sqlite'); Config::set('database.connections.sqlite.database', ':memory:'); $this->startSession(); }
public function setUp() { parent::setUp(); $this->root = realpath('tests/_data/disk/root'); $this->path = 'backups'; $this->testFilesPath = realpath($this->root . '/' . $this->path); //make sure all files in our testdirectory are 5 days old foreach (scandir($this->testFilesPath) as $file) { touch($this->testFilesPath . '/' . $file, time() - 60 * 60 * 24 * 5); } $this->disk = new Illuminate\Filesystem\FilesystemAdapter(new Filesystem(new Local($this->root))); $this->fileSelector = new FileSelector($this->disk, $this->path); }
public function setUp() { parent::setUp(); View::addLocation(__DIR__ . '/../views'); Route::get('user/{id}', ['as' => 'get_user', function ($id) { return $id; }]); Route::get('comment/{id}', ['as' => 'get_comment', function ($id) { return $id; }]); Route::get('post/{id}', ['as' => 'get_post', function ($id) { return $id; }]); }
public function setUp() { parent::setUp(); $this->subscription = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface', $this->subscription); $this->newsletter = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface', $this->newsletter); $this->upload = Mockery::mock('designpond\\newsletter\\Newsletter\\Service\\UploadInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Service\\UploadInterface', $this->upload); $this->list = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterListInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterListInterface', $this->list); $this->withFactories(dirname(__DIR__) . '/newsletter/factories'); $users = \App\Droit\User\Entities\User::all(); $user = $users->first(); $this->actingAs($user); }
public function setUp() { parent::setUp(); // Load Dotenv Dotenv::load(__DIR__); // Set Laravel configuration parameters Config::set('elvis.api_endpoint_uri', getenv('ELVIS_API_ENDPOINT_URI')); Config::set('elvis.username', getenv('ELVIS_USERNAME')); Config::set('elvis.password', getenv('ELVIS_PASSWORD')); // Get session Id to user in the queries $this->sessionId = Elvis::login(); // Upload a randon file to Elvis for various tests $temporaryFilename = tempnam("/tmp", "ElvisTest"); // Create a file and store asset id $create = Elvis::create($this->sessionId, $temporaryFilename); $this->assetId = $create->id; // Remove temporary file unlink($temporaryFilename); }
public function setUp() { parent::setUp(); $this->worker = Mockery::mock('designpond\\newsletter\\Newsletter\\Worker\\MailjetServiceInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Worker\\MailjetServiceInterface', $this->worker); $this->subscription = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterUserInterface', $this->subscription); $this->newsletter = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterInterface', $this->newsletter); $this->campagne = Mockery::mock('designpond\\newsletter\\Newsletter\\Repo\\NewsletterCampagneInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Repo\\NewsletterCampagneInterface', $this->campagne); $this->camp = Mockery::mock('designpond\\newsletter\\Newsletter\\Worker\\CampagneInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Worker\\CampagneInterface', $this->camp); $this->upload = Mockery::mock('designpond\\newsletter\\Newsletter\\Service\\UploadInterface'); $this->app->instance('designpond\\newsletter\\Newsletter\\Service\\UploadInterface', $this->upload); $this->excel = Mockery::mock('Maatwebsite\\Excel\\Excel'); $this->app->instance('Maatwebsite\\Excel\\Excel', $this->excel); $this->import = new \designpond\newsletter\Newsletter\Worker\ImportWorker($this->worker, $this->subscription, $this->newsletter, $this->excel, $this->campagne, $this->camp, $this->upload); $this->withFactories(dirname(__DIR__) . '/newsletter/factories'); }