@@ -13,7 +13,7 @@ class ObservedModelTests extends TestCase
1313 public function it_works_perfectly_on_creating_a_new_post ()
1414 {
1515 $ this ->impersonateUser ();
16- $ post = factory ( Post::class )->create ();
16+ $ post = Post::factory ( )->create ();
1717
1818 $ this ->assertFalse ($ post ->isDirty ('created_by ' ));
1919 $ this ->assertFalse ($ post ->isDirty ('updated_by ' ));
@@ -25,7 +25,7 @@ public function it_works_perfectly_on_creating_a_new_post()
2525 public function it_works_perfectly_on_updating_existing_post ()
2626 {
2727 $ this ->impersonateUser ();
28- $ post = factory ( Post::class )->create ();
28+ $ post = Post::factory ( )->create ();
2929
3030 $ this ->impersonateOtherUser ();
3131 $ post ->setAttribute ('title ' , 'Another Title ' );
@@ -41,7 +41,7 @@ public function it_works_perfectly_on_updating_existing_post()
4141 public function it_works_perfectly_on_deleting_post1 ()
4242 {
4343 $ this ->impersonateUser ();
44- $ post = factory ( Post::class )->create ();
44+ $ post = Post::factory ( )->create ();
4545
4646 $ post ->delete ();
4747 $ deletedPost = Post::onlyTrashed ()->where ('id ' , $ post ->getKey ())->first ();
@@ -53,7 +53,7 @@ public function it_works_perfectly_on_deleting_post1()
5353 public function it_works_perfectly_on_deleting_post2 ()
5454 {
5555 $ this ->impersonateUser ();
56- $ post = factory ( Post::class )->create ();
56+ $ post = Post::factory ( )->create ();
5757
5858 $ this ->impersonateOtherUser ();
5959 $ post ->delete ();
@@ -67,7 +67,7 @@ public function it_works_perfectly_on_deleting_post2()
6767 public function it_works_perfectly_on_restoring_deleted_post ()
6868 {
6969 $ this ->impersonateUser ();
70- $ post = factory ( Post::class )->create ();
70+ $ post = Post::factory ( )->create ();
7171
7272 $ this ->impersonateOtherUser ();
7373 $ post ->delete ();
@@ -81,7 +81,7 @@ public function it_works_perfectly_on_restoring_deleted_post()
8181 public function it_works_perfectly_on_creating_a_new_comment ()
8282 {
8383 $ this ->impersonateUser ();
84- $ comment = factory ( Comment::class )->create ([
84+ $ comment = Comment::factory ( )->create ([
8585 'post_id ' => 100
8686 ]);
8787
@@ -95,8 +95,8 @@ public function it_works_perfectly_on_creating_a_new_comment()
9595 public function it_works_perfectly_on_updating_existing_comment ()
9696 {
9797 $ this ->impersonateUser ();
98- $ post = factory ( Post::class )->create ();
99- $ comment = factory ( Comment::class )->create ([
98+ $ post = Post::factory ( )->create ();
99+ $ comment = Comment::factory ( )->create ([
100100 'post_id ' => $ post ->getKey ()
101101 ]);
102102
@@ -119,7 +119,7 @@ public function it_works_perfectly_on_updating_existing_comment()
119119 public function it_works_perfectly_on_deleting_comment1 ()
120120 {
121121 $ this ->impersonateUser ();
122- $ comment = factory ( Comment::class )->create ([
122+ $ comment = Comment::factory ( )->create ([
123123 'post_id ' => 100
124124 ]);
125125
@@ -133,7 +133,7 @@ public function it_works_perfectly_on_deleting_comment1()
133133 public function it_works_perfectly_on_deleting_comment2 ()
134134 {
135135 $ this ->impersonateUser ();
136- $ comment = factory ( Comment::class )->create ([
136+ $ comment = Comment::factory ( )->create ([
137137 'post_id ' => 100
138138 ]);
139139
@@ -149,7 +149,7 @@ public function it_works_perfectly_on_deleting_comment2()
149149 public function it_works_perfectly_on_restoring_deleted_comment ()
150150 {
151151 $ this ->impersonateUser ();
152- $ comment = factory ( Comment::class )->create ([
152+ $ comment = Comment::factory ( )->create ([
153153 'post_id ' => 100
154154 ]);
155155
@@ -188,7 +188,7 @@ public function it_works_perfectly_on_creating_a_new_user2()
188188 public function it_works_perfectly_on_updating_existing_user ()
189189 {
190190 $ this ->impersonateUser ();
191- $ user = factory ( User::class )->create ();
191+ $ user = User::factory ( )->create ();
192192
193193 $ this ->impersonateOtherUser ();
194194 $ user->
setAttribute (
'email ' ,
'[email protected] ' );
@@ -204,7 +204,7 @@ public function it_works_perfectly_on_updating_existing_user()
204204 public function it_works_perfectly_on_deleting_user1 ()
205205 {
206206 $ this ->impersonateUser ();
207- $ user = factory ( User::class )->create ();
207+ $ user = User::factory ( )->create ();
208208
209209 $ user ->delete ();
210210 $ deletedUser = User::onlyTrashed ()->where ('id ' , $ user ->getKey ())->first ();
@@ -216,7 +216,7 @@ public function it_works_perfectly_on_deleting_user1()
216216 public function it_works_perfectly_on_deleting_user2 ()
217217 {
218218 $ this ->impersonateUser ();
219- $ user = factory ( User::class )->create ();
219+ $ user = User::factory ( )->create ();
220220
221221 $ this ->impersonateOtherUser ();
222222 $ user ->delete ();
@@ -230,7 +230,7 @@ public function it_works_perfectly_on_deleting_user2()
230230 public function it_works_perfectly_on_restoring_deleted_user ()
231231 {
232232 $ this ->impersonateUser ();
233- $ user = factory ( User::class )->create ();
233+ $ user = User::factory ( )->create ();
234234
235235 $ this ->impersonateOtherUser ();
236236 $ user ->delete ();
@@ -243,7 +243,7 @@ public function it_works_perfectly_on_restoring_deleted_user()
243243 /** @test */
244244 public function it_will_set_null_creator_and_null_updater_on_unauthenticated_user ()
245245 {
246- $ post = factory ( Post::class )->create ();
246+ $ post = Post::factory ( )->create ();
247247
248248 $ this ->assertNull ($ post ->getAttribute ('created_by ' ));
249249 $ this ->assertNull ($ post ->getAttribute ('updated_by ' ));
@@ -254,7 +254,7 @@ public function it_wont_cause_any_error_when_deleting_model_without_soft_deletes
254254 {
255255 $ this ->impersonateAdmin ();
256256
257- $ news = factory ( News::class )->create ();
257+ $ news = News::factory ( )->create ();
258258 $ news ->delete ();
259259 $ news ->fresh ();
260260
0 commit comments