diff --git a/tests/TestCase.php b/tests/TestCase.php index 8e00b75..253742f 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -48,7 +48,7 @@ protected function publishPackageMigrations() */ protected function destroyPackageMigrations() { - File::cleanDirectory(__DIR__ . '/../vendor/orchestra/testbench-core/laravel/database/migrations'); + File::cleanDirectory(__DIR__.'/../vendor/orchestra/testbench-core/laravel/database/migrations'); } /** @@ -93,8 +93,8 @@ private function setDefaultUserModel($app) */ protected function setUpDatabase() { - include_once __DIR__ . '/../migrations/2018_06_25_000000_create_bans_table.php'; - include_once __DIR__ . '/database/migrations/2018_06_25_000000__create_user_table.php'; + include_once __DIR__.'/../migrations/2018_06_25_000000_create_bans_table.php'; + include_once __DIR__.'/database/migrations/2018_06_25_000000__create_user_table.php'; (new \CreateBansTable())->up(); (new \CreateUserTable())->up(); @@ -129,6 +129,7 @@ public function factory($class, $attributes = [], $amount = null) public function createUser($class = null, $attributes = [], $amount = null) { $class = $class ?? User::class; + return $this->factory( $class, array_merge( @@ -161,4 +162,4 @@ public function createBan($attributes = [], $amount = null) $amount ); } -} \ No newline at end of file +} diff --git a/tests/Unit/BanExceptionTest.php b/tests/Unit/BanExceptionTest.php index 8e37954..49a08d9 100644 --- a/tests/Unit/BanExceptionTest.php +++ b/tests/Unit/BanExceptionTest.php @@ -26,4 +26,4 @@ public function it_can_throw_BannableTraitNotUsed_exception() $response = $middleware->handle($request, function () { }); } -} \ No newline at end of file +} diff --git a/tests/Unit/BanMiddlewareTest.php b/tests/Unit/BanMiddlewareTest.php index c6050a5..afd350e 100644 --- a/tests/Unit/BanMiddlewareTest.php +++ b/tests/Unit/BanMiddlewareTest.php @@ -44,4 +44,4 @@ public function it_cannot_redirect_to_non_banned_user() $this->assertEquals($response, null); } -} \ No newline at end of file +} diff --git a/tests/Unit/BanModelTest.php b/tests/Unit/BanModelTest.php index 35b63a3..8aa1084 100644 --- a/tests/Unit/BanModelTest.php +++ b/tests/Unit/BanModelTest.php @@ -121,4 +121,4 @@ public function it_can_scope_bannable_models() $bannableModels = Ban::whereBannable($user2)->get(); $this->assertCount(2, $bannableModels); } -} \ No newline at end of file +} diff --git a/tests/Unit/BanObserverTest.php b/tests/Unit/BanObserverTest.php index a4e090e..de49add 100644 --- a/tests/Unit/BanObserverTest.php +++ b/tests/Unit/BanObserverTest.php @@ -56,4 +56,4 @@ public function it_can_unset_banned_flag_to_owner_model_on_delete() $this->assertNull($user->fresh()->banned_at); } -} \ No newline at end of file +} diff --git a/tests/Unit/BannableTest.php b/tests/Unit/BannableTest.php index 4c6f63f..ed3e58a 100644 --- a/tests/Unit/BannableTest.php +++ b/tests/Unit/BannableTest.php @@ -180,4 +180,4 @@ public function model_can_ban_with_expiration_date() $this->assertEquals('2086-03-28 00:00:00', $ban->expired_at); } -} \ No newline at end of file +} diff --git a/tests/Unit/BannedScopeTest.php b/tests/Unit/BannedScopeTest.php index 58c2ac3..2c40ea1 100644 --- a/tests/Unit/BannedScopeTest.php +++ b/tests/Unit/BannedScopeTest.php @@ -88,4 +88,4 @@ public function it_can_disable_banned_at_default_scope() $this->assertCount(5, $entities); } -} \ No newline at end of file +} diff --git a/tests/Unit/ModelBannedEventTest.php b/tests/Unit/ModelBannedEventTest.php index 8db66e3..fadf292 100644 --- a/tests/Unit/ModelBannedEventTest.php +++ b/tests/Unit/ModelBannedEventTest.php @@ -13,7 +13,7 @@ public function it_can_fire_event_on_helper_call() { $this->expectsEvents(ModelWasBanned::class); - $entity = $this->createUser(User::class);; + $entity = $this->createUser(User::class); $entity->ban(); } @@ -23,8 +23,8 @@ public function it_can_fire_event_on_relation_create() { $this->expectsEvents(ModelWasBanned::class); - $entity = $this->createUser(User::class);; + $entity = $this->createUser(User::class); $entity->bans()->create(); } -} \ No newline at end of file +} diff --git a/tests/Unit/ModelUnbannedEventTest.php b/tests/Unit/ModelUnbannedEventTest.php index 2b3f335..efc8489 100644 --- a/tests/Unit/ModelUnbannedEventTest.php +++ b/tests/Unit/ModelUnbannedEventTest.php @@ -26,4 +26,4 @@ public function it_can_fire_event_on_relation_delete() $ban->delete(); } -} \ No newline at end of file +}