Exemplo n.º 1
0
 /**
  * Setup the test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->setMigrations();
     $this->setFactory();
     //        dump(Application::VERSION);
 }
 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);
 }
Exemplo n.º 3
0
 public function setUp()
 {
     parent::setUp();
     $this->faker = Factory::create();
     exec('if [ ! -d "' . $this->getPath() . '" ]; then mkdir ' . $this->getPath() . '; fi;');
     exec('if [ ! -d "' . $this->getPublicPath() . '" ]; then mkdir ' . $this->getPublicPath() . '; fi;');
 }
Exemplo n.º 4
0
 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();
     });
 }
Exemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     $this->appMock = m::mock("Illuminate\\Foundation\\Application");
     $this->requestMock = m::mock("Illuminate\\Http\\Request");
     $this->routerMock = m::mock("Illuminate\\Routing\\Router");
 }
 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;
     }
 }
 /**
  * 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();
     $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();
     }
 }
Exemplo n.º 10
0
 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('Illuminate\\Contracts\\Console\\Kernel');
     $this->app['path.database'] = __DIR__;
     $artisan->call('migrate', ['--database' => 'testbench']);
 }
Exemplo n.º 11
0
 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();
 }
Exemplo n.º 12
0
 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);
 }
Exemplo n.º 13
0
 public function setUp()
 {
     parent::setUp();
     if (File::exists($this->tempDirectory)) {
         File::deleteDirectory($this->tempDirectory);
     }
     File::makeDirectory($this->tempDirectory);
 }
Exemplo n.º 14
0
 /**
  * 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')]);
 }
Exemplo n.º 15
0
 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();
 }
Exemplo n.º 16
0
 /**
  * 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();
 }
 public function setUp()
 {
     parent::setUp();
     $this->routerMock = m::mock("Optimus\\BatchRequest\\Router\\RouterInterface");
     $this->configMock = ["rollback_db_transactions_on_error" => true];
     $this->resultFormatterMock = m::mock("Optimus\\BatchRequest\\ResultFormatter\\OptimusResultFormatter");
     $this->responseFormatterMock = m::mock("Optimus\\BatchRequest\\ResponseFormatter\\OptimusResponseFormatter");
     $this->dbMock = m::mock("Optimus\\BatchRequest\\Database\\TransactionInterface");
 }
Exemplo n.º 18
0
 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']);
 }
 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();
 }
Exemplo n.º 20
0
 /**
  *
  */
 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);
 }
Exemplo n.º 21
0
 /**
  * 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();
 }
Exemplo n.º 22
0
 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');
 }
Exemplo n.º 23
0
 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', '');
 }
Exemplo n.º 24
0
 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');
 }
Exemplo n.º 25
0
 /**
  * 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']);
 }
Exemplo n.º 26
0
 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();
 }
Exemplo n.º 27
0
 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);
 }
Exemplo n.º 28
0
 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;
     }]);
 }
Exemplo n.º 29
0
 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);
 }
Exemplo n.º 30
0
 /**
  * Creates the application.
  *
  * @return \Symfony\Component\HttpKernel\HttpKernelInterface
  */
 public function setUp()
 {
     parent::setUp();
     if (!is_dir(__DIR__ . '/themes/default')) {
         mkdir(__DIR__ . '/themes');
         mkdir(__DIR__ . '/themes/default');
         touch(__DIR__ . '/themes/default/hello.php');
     }
     // Create a laravel view folder (Just to test)
     if (!is_dir(__DIR__ . '/views')) {
         mkdir(__DIR__ . '/views');
         touch(__DIR__ . '/views/login.php');
     }
     // return require __DIR__.'/../../../../bootstrap/start.php';
     // require __DIR__.'/../vendor/autoload.php';
 }