コード例 #1
0
ファイル: LinkedEntityTest.php プロジェクト: spira/api-core
 public function setUp()
 {
     parent::setUp();
     $this->app->group([], function ($app) {
         require __DIR__ . '/test_routes.php';
     });
 }
コード例 #2
0
ファイル: TransformerTest.php プロジェクト: spira/api-core
 public function setUp()
 {
     parent::setUp();
     $this->transformer = $this->app->make(EloquentModelTransformer::class);
     $this->app->get('test_entity_one', ['as' => TestEntity::class, 'uses' => 'One@one']);
     $this->app->get('test_entity_two', ['as' => SecondTestEntity::class, 'uses' => 'Two@two']);
 }
コード例 #3
0
ファイル: ElasticSearchTest.php プロジェクト: spira/api-core
 public function setUp()
 {
     parent::setUp();
     if (!TestEntity::indexExists()) {
         TestEntity::createIndex();
     }
     TestEntity::flushEventListeners();
     TestEntity::boot();
     //run event listeners
     TestEntity::removeAllFromIndex();
 }
コード例 #4
0
 public function setUp()
 {
     parent::setUp();
     app()->group([], function ($app) {
         require __DIR__ . '/test_routes.php';
         // $app is used in required file!
     });
     app()->extend(Gate::class, function () {
         return Mockery::mock(Gate::class);
     });
 }
コード例 #5
0
ファイル: EntityTest.php プロジェクト: spira/api-core
 public function setUp()
 {
     parent::setUp();
     // Workaround for model event firing.
     // The package Bosnadev\Database used for automatic UUID creation relies
     // on model events (creating) to generate the UUID.
     //
     // Laravel/Lumen currently doesn't fire repeated model events during
     // unit testing, see: https://github.com/laravel/framework/issues/1181
     TestEntity::flushEventListeners();
     TestEntity::boot();
     $this->app->group([], function ($app) {
         require __DIR__ . '/test_routes.php';
     });
 }
コード例 #6
0
ファイル: ValidatorTest.php プロジェクト: spira/api-core
 public function setUp()
 {
     parent::setUp();
     $this->validator = $this->app->make('validator');
 }
コード例 #7
0
ファイル: CacheTest.php プロジェクト: spira/api-core
 /**
  * Add key-value pair to the cache.
  */
 public function setUp()
 {
     parent::setUp();
     Cache::forever(self::$cacheKey, self::$cacheValue);
 }