コード例 #1
0
 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $artisan->call('migrate', ['--database' => 'testbench', '--path' => '../tests/migrations']);
     $this->countQueries();
 }
コード例 #2
0
 /**
  * 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']);
 }
コード例 #3
0
ファイル: BaseTest.php プロジェクト: coandacms/coanda-core
 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $output = new BufferedOutput();
     $artisan->call('migrate', ['--database' => 'testbench', '--path' => 'migrations'], $output);
 }
コード例 #4
0
ファイル: TestCase.php プロジェクト: Waavi/responsecache
 public function setUp()
 {
     parent::setUp();
     //$this->app['cache']->clear();
     $this->setUpDatabase($this->app);
     $this->setUpRoutes($this->app);
 }
コード例 #5
0
 /**
  * Setup the test environment.
  */
 public function setUp()
 {
     parent::setUp();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/migrations')]);
     $this->withFactories(__DIR__ . '/factories');
     \Cache::flush();
 }
コード例 #6
0
ファイル: TestCase.php プロジェクト: czim/laravel-pxlcms
 public function setUp()
 {
     parent::setUp();
     $this->queries = new Helpers\SqliteQueries();
     $this->migrateDatabase();
     $this->seedDatabase();
 }
コード例 #7
0
ファイル: TestCase.php プロジェクト: kun391/laravel-generator
 public function setUp()
 {
     parent::setUp();
     if (File::isDirectory('packages')) {
         File::deleteDirectory('packages');
     }
 }
コード例 #8
0
 /**
  * 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');
 }
コード例 #9
0
 public function setUp()
 {
     parent::setUp();
     require_once __DIR__ . "/../../src/routes.php";
     $this->useMailPretend();
     $this->useNullLogger();
 }
コード例 #10
0
 public function tearDown()
 {
     parent::tearDown();
     if (file_exists($this->testImage)) {
         unlink($this->testImage);
     }
 }
コード例 #11
0
 /**
  * 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);
 }
コード例 #12
0
 public function setUp()
 {
     parent::setUp();
     $this->app->bindShared('path.base', function () {
         return BASE_PATH;
     });
 }
コード例 #13
0
 /**
  * Tear down test.
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->dilemma);
     unset($this->resolution);
     unset($this->map);
 }
コード例 #14
0
ファイル: IsbnIsUniqueTest.php プロジェクト: bakgat/notos
 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);
 }
コード例 #15
0
ファイル: TestCase.php プロジェクト: nodes-php/database
 /**
  * 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);
 }
コード例 #16
0
 public function setUp()
 {
     parent::setUp();
     // setup Slack API
     $token = getenv('slack_token');
     $this->slackApi = new SlackApi($token);
 }
コード例 #17
0
 /**
  * @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'));
 }
コード例 #18
0
ファイル: GroupServiceTest.php プロジェクト: bakgat/notos
 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);
 }
コード例 #19
0
 public function setUp()
 {
     parent::setUp();
     $this->queueCheckerJob = new QueueCheckerJob();
     $this->taskMock = m::mock();
     $this->taskMock->shouldReceive('delete');
 }
コード例 #20
0
 /**
  * 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;
 }
コード例 #21
0
ファイル: PackageTestCase.php プロジェクト: reecms/theme
 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;
 }
コード例 #22
0
ファイル: BookServiceTest.php プロジェクト: bakgat/notos
 public function setUp()
 {
     parent::setUp();
     $this->setupMocks();
     $this->bookService = new BookService($this->bookRepo, $this->orgRepo);
     $this->setupTestData();
 }
コード例 #23
0
 public function setUp()
 {
     parent::setUp();
     $this->app->instance('path.public', __DIR__ . '/fixture');
     Image::deleteManipulated($this->imagePath);
     $this->imageSize = getimagesize(public_path() . $this->imagePath);
 }
コード例 #24
0
 public function tearDown()
 {
     $customPath = $this->app['path.public'] . '/custom';
     $this->app['config']->set('image.write_path', $customPath);
     Image::deleteManipulated($this->imagePath);
     parent::tearDown();
 }
コード例 #25
0
 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]);
 }
コード例 #26
0
 /**
  * Set up the tests.
  */
 public function setUp()
 {
     parent::setUp();
     $this->translator = $this->app['translator'];
     $this->detector = new LanguageDetector($this->translator);
     $this->translator->setLocale('fr');
 }
コード例 #27
0
ファイル: BaseTestCase.php プロジェクト: tacone/bees
 public function setUp()
 {
     parent::setUp();
     \Config::set('database.default', 'sqlite');
     \Config::set('database.connections', ['sqlite' => array('driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '')]);
     $this->createDatabase();
 }
コード例 #28
0
ファイル: TestsBase.php プロジェクト: dimsav/laravel-nested
 public function setUp()
 {
     parent::setUp();
     $artisan = $this->app->make('artisan');
     $this->resetDatabase($artisan);
     $this->countQueries();
 }
コード例 #29
0
ファイル: MPDIsLocalTest.php プロジェクト: xnum/lxmpd
 /**
  * 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',
       ));*/
 }
コード例 #30
0
ファイル: UserServiceTest.php プロジェクト: bakgat/notos
 public function setUp()
 {
     parent::setUp();
     $this->setupMocks();
     $this->userService = new UserService($this->userRepo, $this->orgRepo, $this->roleRepo, $this->userRoleRepo, $this->hasher);
     $this->setupTestData();
 }