2020
2121final class BanTest extends AbstractTestCase
2222{
23- /** @test */
24- public function it_can_fill_comment (): void
23+ public function test_it_can_fill_comment (): void
2524 {
2625 $ ban = new Ban ([
2726 'comment ' => 'Enjoy your ban! ' ,
@@ -30,8 +29,7 @@ public function it_can_fill_comment(): void
3029 $ this ->assertSame ('Enjoy your ban! ' , $ ban ->comment );
3130 }
3231
33- /** @test */
34- public function it_can_fill_expired_at (): void
32+ public function test_it_can_fill_expired_at (): void
3533 {
3634 $ expiredAt = Carbon::now ()->toDateTimeString ();
3735
@@ -42,8 +40,7 @@ public function it_can_fill_expired_at(): void
4240 $ this ->assertEquals ($ expiredAt , $ ban ->getAttribute ('expired_at ' ));
4341 }
4442
45- /** @test */
46- public function it_can_fill_created_by_type (): void
43+ public function test_it_can_fill_created_by_type (): void
4744 {
4845 $ ban = new Ban ([
4946 'created_by_type ' => 'TestType ' ,
@@ -52,8 +49,7 @@ public function it_can_fill_created_by_type(): void
5249 $ this ->assertSame ('TestType ' , $ ban ->getAttribute ('created_by_type ' ));
5350 }
5451
55- /** @test */
56- public function it_can_fill_created_by_id (): void
52+ public function test_it_can_fill_created_by_id (): void
5753 {
5854 $ ban = new Ban ([
5955 'created_by_id ' => '4 ' ,
@@ -62,8 +58,7 @@ public function it_can_fill_created_by_id(): void
6258 $ this ->assertSame ('4 ' , $ ban ->getAttribute ('created_by_id ' ));
6359 }
6460
65- /** @test */
66- public function it_casts_expired_at (): void
61+ public function test_it_casts_expired_at (): void
6762 {
6863 $ ban = new Ban ([
6964 'expired_at ' => '2018-03-28 00:00:00 ' ,
@@ -72,8 +67,7 @@ public function it_casts_expired_at(): void
7267 $ this ->assertInstanceOf (Carbon::class, $ ban ->getAttribute ('expired_at ' ));
7368 }
7469
75- /** @test */
76- public function it_casts_deleted_at (): void
70+ public function test_it_casts_deleted_at (): void
7771 {
7872 $ ban = Ban::factory ()->create ([
7973 'deleted_at ' => '2018-03-28 00:00:00 ' ,
@@ -82,8 +76,7 @@ public function it_casts_deleted_at(): void
8276 $ this ->assertInstanceOf (Carbon::class, $ ban ->deleted_at );
8377 }
8478
85- /** @test */
86- public function it_not_modify_null_expired_at (): void
79+ public function test_it_not_modify_null_expired_at (): void
8780 {
8881 $ ban = new Ban ([
8982 'expired_at ' => null ,
@@ -92,8 +85,7 @@ public function it_not_modify_null_expired_at(): void
9285 $ this ->assertNull ($ ban ->getAttribute ('expired_at ' ));
9386 }
9487
95- /** @test */
96- public function it_can_has_ban_creator (): void
88+ public function test_it_can_has_ban_creator (): void
9789 {
9890 $ bannedBy = User::factory ()->create ();
9991
@@ -105,8 +97,7 @@ public function it_can_has_ban_creator(): void
10597 $ this ->assertInstanceOf (User::class, $ ban ->createdBy );
10698 }
10799
108- /** @test */
109- public function it_can_set_custom_ban_creator (): void
100+ public function test_it_can_set_custom_ban_creator (): void
110101 {
111102 $ bannable = User::factory ()->create ();
112103 $ bannedBy = User::factory ()->create ();
@@ -119,8 +110,7 @@ public function it_can_set_custom_ban_creator(): void
119110 $ this ->assertTrue ($ ban ->createdBy ->is ($ bannedBy ));
120111 }
121112
122- /** @test */
123- public function it_not_overwrite_ban_creator_with_auth_user_if_custom_value_is_provided (): void
113+ public function test_it_not_overwrite_ban_creator_with_auth_user_if_custom_value_is_provided (): void
124114 {
125115 $ bannable = User::factory ()->create ();
126116 $ bannedBy = User::factory ()->create ();
@@ -136,8 +126,7 @@ public function it_not_overwrite_ban_creator_with_auth_user_if_custom_value_is_p
136126 $ this ->assertTrue ($ ban ->createdBy ->is ($ bannedBy ));
137127 }
138128
139- /** @test */
140- public function it_can_make_model_with_expire_carbon_date (): void
129+ public function test_it_can_make_model_with_expire_carbon_date (): void
141130 {
142131 $ expiredAt = Carbon::now ();
143132
@@ -148,8 +137,7 @@ public function it_can_make_model_with_expire_carbon_date(): void
148137 $ this ->assertEquals ($ expiredAt , $ ban ->getAttribute ('expired_at ' ));
149138 }
150139
151- /** @test */
152- public function it_can_make_model_with_expire_string_date (): void
140+ public function test_it_can_make_model_with_expire_string_date (): void
153141 {
154142 $ ban = new Ban ([
155143 'expired_at ' => '2086-03-28 00:00:00 ' ,
@@ -158,8 +146,7 @@ public function it_can_make_model_with_expire_string_date(): void
158146 $ this ->assertEquals ('2086-03-28 00:00:00 ' , $ ban ->getAttribute ('expired_at ' ));
159147 }
160148
161- /** @test */
162- public function it_can_make_model_with_expire_relative_date (): void
149+ public function test_it_can_make_model_with_expire_relative_date (): void
163150 {
164151 $ ban = new Ban ([
165152 'expired_at ' => '+1 year ' ,
@@ -172,8 +159,7 @@ public function it_can_make_model_with_expire_relative_date(): void
172159 );
173160 }
174161
175- /** @test */
176- public function it_can_has_bannable_model (): void
162+ public function test_it_can_has_bannable_model (): void
177163 {
178164 $ user = User::factory ()->create ();
179165
@@ -185,8 +171,7 @@ public function it_can_has_bannable_model(): void
185171 $ this ->assertInstanceOf (User::class, $ ban ->bannable );
186172 }
187173
188- /** @test */
189- public function it_can_scope_bannable_models (): void
174+ public function test_it_can_scope_bannable_models (): void
190175 {
191176 $ user1 = User::factory ()->create ();
192177 Ban::factory ()->count (4 )->create ([
@@ -204,8 +189,7 @@ public function it_can_scope_bannable_models(): void
204189 $ this ->assertCount (4 , $ bannableModels );
205190 }
206191
207- /** @test */
208- public function it_can_check_if_ban_is_permanent (): void
192+ public function test_it_can_check_if_ban_is_permanent (): void
209193 {
210194 $ permanentBan = new Ban ();
211195 $ temporaryBan = new Ban ([
@@ -216,8 +200,7 @@ public function it_can_check_if_ban_is_permanent(): void
216200 $ this ->assertFalse ($ temporaryBan ->isPermanent ());
217201 }
218202
219- /** @test */
220- public function it_can_check_if_ban_is_temporary (): void
203+ public function test_it_can_check_if_ban_is_temporary (): void
221204 {
222205 $ permanentBan = new Ban ();
223206 $ temporaryBan = new Ban ([
@@ -228,8 +211,7 @@ public function it_can_check_if_ban_is_temporary(): void
228211 $ this ->assertTrue ($ temporaryBan ->isTemporary ());
229212 }
230213
231- /** @test */
232- public function it_can_check_if_ban_with_null_expired_at_is_permanent (): void
214+ public function test_it_can_check_if_ban_with_null_expired_at_is_permanent (): void
233215 {
234216 $ permanentBan = new Ban ([
235217 'expired_at ' => null ,
0 commit comments