@@ -24,17 +24,17 @@ public function it_can_create_a_note()
2424 /** @var Post $post */
2525 $ post = $ this ->factory ->create (Post::class);
2626
27- $ this -> assertNull ($ post ->note );
27+ static :: assertNull ($ post ->note );
2828
2929 $ note = $ post ->createNote ($ content = 'Hello world #1 ' );
3030
31- $ this -> assertInstanceOf (Note::class, $ post ->note );
31+ static :: assertInstanceOf (Note::class, $ post ->note );
3232
33- $ this -> assertSame ($ note ->id , $ post ->note ->id );
34- $ this -> assertSame ($ content , $ post ->note ->content );
35- $ this -> assertSame ($ note ->content , $ post ->note ->content );
33+ static :: assertSame ($ note ->id , $ post ->note ->id );
34+ static :: assertSame ($ content , $ post ->note ->content );
35+ static :: assertSame ($ note ->content , $ post ->note ->content );
3636
37- $ this -> assertNull ($ post ->note ->author );
37+ static :: assertNull ($ post ->note ->author );
3838 }
3939
4040 /** @test */
@@ -43,25 +43,25 @@ public function it_should_create_single_note_for_has_one_note_trait()
4343 /** @var Post $post */
4444 $ post = $ this ->factory ->create (Post::class);
4545
46- $ this -> assertNull ($ post ->note );
46+ static :: assertNull ($ post ->note );
4747
4848 $ note = $ post ->createNote ($ content = 'Hello world #1 ' );
4949
50- $ this -> assertInstanceOf (Note::class, $ post ->note );
50+ static :: assertInstanceOf (Note::class, $ post ->note );
5151
52- $ this -> assertSame ($ note ->id , $ post ->note ->id );
53- $ this -> assertSame ($ content , $ note ->content );
54- $ this -> assertSame ($ note ->content , $ post ->note ->content );
52+ static :: assertSame ($ note ->id , $ post ->note ->id );
53+ static :: assertSame ($ content , $ note ->content );
54+ static :: assertSame ($ note ->content , $ post ->note ->content );
5555
5656 $ note = $ post ->createNote ($ content = 'Hello world #2 ' );
5757
58- $ this -> assertInstanceOf (Note::class, $ post ->note );
58+ static :: assertInstanceOf (Note::class, $ post ->note );
5959
60- $ this -> assertSame ($ note ->id , $ post ->note ->id );
61- $ this -> assertSame ($ content , $ note ->content );
62- $ this -> assertSame ($ note ->content , $ post ->note ->content );
60+ static :: assertSame ($ note ->id , $ post ->note ->id );
61+ static :: assertSame ($ content , $ note ->content );
62+ static :: assertSame ($ note ->content , $ post ->note ->content );
6363
64- $ this -> assertCount (1 , Note::all ());
64+ static :: assertCount (1 , Note::all ());
6565 }
6666
6767 /** @test */
@@ -76,14 +76,14 @@ public function it_can_create_with_author()
7676
7777 $ note = $ post ->createNote ($ content = 'Hello world #1 ' , $ user );
7878
79- $ this -> assertSame ($ content , $ note ->content );
80- $ this -> assertSame ($ content , $ post ->note ->content );
79+ static :: assertSame ($ content , $ note ->content );
80+ static :: assertSame ($ content , $ post ->note ->content );
8181
82- $ this -> assertInstanceOf (User::class, $ note ->author );
83- $ this -> assertInstanceOf (User::class, $ post ->note ->author );
82+ static :: assertInstanceOf (User::class, $ note ->author );
83+ static :: assertInstanceOf (User::class, $ post ->note ->author );
8484
85- $ this -> assertEquals ($ user ->id , $ note ->author ->id );
86- $ this -> assertEquals ($ user ->id , $ post ->note ->author ->id );
85+ static :: assertEquals ($ user ->id , $ note ->author ->id );
86+ static :: assertEquals ($ user ->id , $ post ->note ->author ->id );
8787 }
8888
8989 /** @test */
@@ -92,25 +92,25 @@ public function it_can_update_note()
9292 /** @var Post $post */
9393 $ post = $ this ->factory ->create (Post::class);
9494
95- $ this -> assertNull ($ post ->note );
95+ static :: assertNull ($ post ->note );
9696
9797 $ note = $ post ->createNote ($ content = 'Hello world #1 ' );
9898
99- $ this -> assertInstanceOf (Note::class, $ post ->note );
99+ static :: assertInstanceOf (Note::class, $ post ->note );
100100
101- $ this -> assertSame ($ note ->id , $ post ->note ->id );
102- $ this -> assertSame ($ content , $ note ->content );
103- $ this -> assertSame ($ note ->content , $ post ->note ->content );
101+ static :: assertSame ($ note ->id , $ post ->note ->id );
102+ static :: assertSame ($ content , $ note ->content );
103+ static :: assertSame ($ note ->content , $ post ->note ->content );
104104
105105 $ post ->updateNote ($ content = 'Hello world #2 ' );
106106
107- $ this -> assertInstanceOf (Note::class, $ post ->note );
107+ static :: assertInstanceOf (Note::class, $ post ->note );
108108
109- $ this -> assertSame ($ note ->id , $ post ->note ->id );
110- $ this -> assertSame ($ content , $ post ->note ->content );
111- $ this -> assertNotSame ($ note ->content , $ post ->note ->content );
109+ static :: assertSame ($ note ->id , $ post ->note ->id );
110+ static :: assertSame ($ content , $ post ->note ->content );
111+ static :: assertNotSame ($ note ->content , $ post ->note ->content );
112112
113- $ this -> assertCount (1 , Note::all ());
113+ static :: assertCount (1 , Note::all ());
114114 }
115115
116116 /** @test */
@@ -119,13 +119,13 @@ public function it_can_reverse_relation()
119119 /** @var Post $post */
120120 $ post = $ this ->factory ->create (Post::class);
121121
122- $ this -> assertNull ($ post ->note );
122+ static :: assertNull ($ post ->note );
123123
124124 $ note = $ post ->createNote ($ content = 'Hello world #1 ' );
125125
126- $ this -> assertSame ($ post ->id , $ note ->noteable ->id );
127- $ this -> assertSame ($ post ->title , $ note ->noteable ->title );
128- $ this -> assertSame ($ post ->content , $ note ->noteable ->content );
126+ static :: assertSame ($ post ->id , $ note ->noteable ->id );
127+ static :: assertSame ($ post ->title , $ note ->noteable ->title );
128+ static :: assertSame ($ post ->content , $ note ->noteable ->content );
129129 }
130130
131131 /* -----------------------------------------------------------------
@@ -139,12 +139,12 @@ public function it_can_add_note()
139139 /** @var User $user */
140140 $ user = $ this ->factory ->create (User::class);
141141
142- $ this -> assertCount (0 , $ user ->notes );
142+ static :: assertCount (0 , $ user ->notes );
143143
144144 $ note = $ user ->createNote ($ content = 'Hello world #1 ' );
145145
146- $ this -> assertCount (1 , $ user ->notes );
147- $ this -> assertNull ($ note ->author );
146+ static :: assertCount (1 , $ user ->notes );
147+ static :: assertNull ($ note ->author );
148148 }
149149
150150 /** @test */
@@ -153,12 +153,12 @@ public function it_can_add_note_without_get_current_author_id_method()
153153 /** @var \Arcanedev\LaravelNotes\Tests\Stubs\Models\UserWithAuthorId $user */
154154 $ user = $ this ->factory ->create (UserWithAuthorId::class);
155155
156- $ this -> assertCount (0 , $ user ->notes );
156+ static :: assertCount (0 , $ user ->notes );
157157
158158 $ note = $ user ->createNote ($ content = 'Hello world #1 ' );
159159
160- $ this -> assertCount (1 , $ user ->notes );
161- $ this -> assertSame ($ user ->id , $ note ->author ->id );
160+ static :: assertCount (1 , $ user ->notes );
161+ static :: assertSame ($ user ->id , $ note ->author ->id );
162162 }
163163
164164 /** @test */
@@ -170,7 +170,7 @@ public function it_can_find_note_by_its_id()
170170 $ created = $ user ->createNote ($ content = 'Hello world #1 ' );
171171 $ note = $ user ->findNote ($ created ->id );
172172
173- $ this -> assertSame ($ note ->id , $ created ->id );
173+ static :: assertSame ($ note ->id , $ created ->id );
174174 }
175175
176176 /** @test */
@@ -179,14 +179,14 @@ public function it_can_retrieve_authored_notes()
179179 /** @var \Arcanedev\LaravelNotes\Tests\Stubs\Models\User $user */
180180 $ user = $ this ->factory ->create (User::class);
181181
182- $ this -> assertCount (0 , $ user ->notes );
183- $ this -> assertCount (0 , $ user ->authoredNotes );
182+ static :: assertCount (0 , $ user ->notes );
183+ static :: assertCount (0 , $ user ->authoredNotes );
184184
185185 $ user ->createNote ('Hello World #1 ' , $ user );
186186 $ user ->createNote ('Hello World #2 ' , $ user );
187187
188- $ this -> assertCount (2 , $ user ->notes );
189- $ this -> assertCount (2 , $ user ->authoredNotes ()->get ());
188+ static :: assertCount (2 , $ user ->notes );
189+ static :: assertCount (2 , $ user ->authoredNotes ()->get ());
190190 }
191191
192192 /** @test */
@@ -202,10 +202,10 @@ public function it_must_retrieve_authored_notes_foreach_owner()
202202 $ userOne ->createNote ('Hello World #1 ' );
203203 $ userOne ->createNote ('Hello World #2 ' , $ userTwo );
204204
205- $ this -> assertCount (2 , $ userOne ->notes );
206- $ this -> assertCount (1 , $ userOne ->authoredNotes );
205+ static :: assertCount (2 , $ userOne ->notes );
206+ static :: assertCount (1 , $ userOne ->authoredNotes );
207207
208- $ this -> assertCount (0 , $ userTwo ->notes );
209- $ this -> assertCount (1 , $ userTwo ->authoredNotes );
208+ static :: assertCount (0 , $ userTwo ->notes );
209+ static :: assertCount (1 , $ userTwo ->authoredNotes );
210210 }
211211}
0 commit comments