@@ -82,15 +82,9 @@ public function testGetOwnerWithoutCategories(): void
8282
8383 public function testLoadCategoriesWithoutLanguage (): void
8484 {
85- $ this ->databaseMock
86- ->expects ($ this ->once ())
87- ->method ('query ' )
88- ->willReturn (true );
85+ $ this ->databaseMock ->expects ($ this ->once ())->method ('query ' )->willReturn (true );
8986
90- $ this ->databaseMock
91- ->expects ($ this ->once ())
92- ->method ('fetchArray ' )
93- ->willReturn (null );
87+ $ this ->databaseMock ->expects ($ this ->once ())->method ('fetchArray ' )->willReturn (null );
9488
9589 $ result = $ this ->category ->loadCategories ();
9690 $ this ->assertIsArray ($ result );
@@ -101,21 +95,11 @@ public function testLoadCategoriesWithLanguage(): void
10195 {
10296 $ this ->category ->setLanguage ('de ' );
10397
104- $ this ->databaseMock
105- ->expects ($ this ->once ())
106- ->method ('escape ' )
107- ->with ('de ' )
108- ->willReturn ('de ' );
98+ $ this ->databaseMock ->expects ($ this ->once ())->method ('escape ' )->with ('de ' )->willReturn ('de ' );
10999
110- $ this ->databaseMock
111- ->expects ($ this ->once ())
112- ->method ('query ' )
113- ->willReturn (true );
100+ $ this ->databaseMock ->expects ($ this ->once ())->method ('query ' )->willReturn (true );
114101
115- $ this ->databaseMock
116- ->expects ($ this ->once ())
117- ->method ('fetchArray ' )
118- ->willReturn (null );
102+ $ this ->databaseMock ->expects ($ this ->once ())->method ('fetchArray ' )->willReturn (null );
119103
120104 $ result = $ this ->category ->loadCategories ();
121105 $ this ->assertIsArray ($ result );
@@ -136,10 +120,7 @@ public function testLoadCategoriesWithSampleData(): void
136120 'image ' => 'test.png ' ,
137121 ];
138122
139- $ this ->databaseMock
140- ->expects ($ this ->once ())
141- ->method ('query ' )
142- ->willReturn (true );
123+ $ this ->databaseMock ->expects ($ this ->once ())->method ('query ' )->willReturn (true );
143124
144125 $ this ->databaseMock
145126 ->expects ($ this ->exactly (2 ))
@@ -159,15 +140,9 @@ public function testLoadCategoriesWithInvalidLanguage(): void
159140 {
160141 $ this ->category ->setLanguage ('invalid_lang_123 ' );
161142
162- $ this ->databaseMock
163- ->expects ($ this ->once ())
164- ->method ('query ' )
165- ->willReturn (true );
143+ $ this ->databaseMock ->expects ($ this ->once ())->method ('query ' )->willReturn (true );
166144
167- $ this ->databaseMock
168- ->expects ($ this ->once ())
169- ->method ('fetchArray ' )
170- ->willReturn (null );
145+ $ this ->databaseMock ->expects ($ this ->once ())->method ('fetchArray ' )->willReturn (null );
171146
172147 $ result = $ this ->category ->loadCategories ();
173148 $ this ->assertIsArray ($ result );
@@ -214,10 +189,7 @@ public function testBuildAdminCategoryTreeWithSpecificParent(): void
214189
215190 public function testFluentInterface (): void
216191 {
217- $ result = $ this ->category
218- ->setLanguage ('de ' )
219- ->setUser (42 )
220- ->setGroups ([1 , 2 , 3 ]);
192+ $ result = $ this ->category ->setLanguage ('de ' )->setUser (42 )->setGroups ([1 , 2 , 3 ]);
221193
222194 $ this ->assertInstanceOf (Category::class, $ result );
223195 $ this ->assertEquals ('de ' , $ this ->category ->getLanguage ());
@@ -240,10 +212,7 @@ public function testGetOwnerAfterLoadingCategories(): void
240212 'image ' => 'test.png ' ,
241213 ];
242214
243- $ this ->databaseMock
244- ->expects ($ this ->once ())
245- ->method ('query ' )
246- ->willReturn (true );
215+ $ this ->databaseMock ->expects ($ this ->once ())->method ('query ' )->willReturn (true );
247216
248217 $ this ->databaseMock
249218 ->expects ($ this ->exactly (2 ))
0 commit comments