3636 */
3737class WebTestCaseConfigTest extends WebTestCase
3838{
39- /** @var \Symfony\Bundle\FrameworkBundle\Client client */
40- private $ client = null ;
41-
4239 protected static function getKernelClass (): string
4340 {
4441 return AppConfigKernel::class;
@@ -51,16 +48,16 @@ public function testIndexAuthenticationArray(): void
5148 {
5249 $ this ->loadFixtures ([]);
5350
54- $ this -> client = static :: makeClient ([
51+ static :: $ client = $ this -> makeClient ([
5552 'username ' => 'foobar ' ,
5653 'password ' => '12341234 ' ,
5754 ]);
5855
5956 $ path = '/ ' ;
6057
61- $ crawler = $ this -> client ->request ('GET ' , $ path );
58+ $ crawler = static :: $ client ->request ('GET ' , $ path );
6259
63- $ this ->assertStatusCode (200 , $ this -> client );
60+ $ this ->assertStatusCode (200 , static :: $ client );
6461
6562 $ this ->assertSame (1 ,
6663 $ crawler ->filter ('html > body ' )->count ());
@@ -85,13 +82,13 @@ public function testIndexAuthenticationTrue(): void
8582 {
8683 $ this ->loadFixtures ([]);
8784
88- $ this -> client = static :: makeClient (true );
85+ static :: $ client = $ this -> makeClient (true );
8986
9087 $ path = '/ ' ;
9188
92- $ crawler = $ this -> client ->request ('GET ' , $ path );
89+ $ crawler = static :: $ client ->request ('GET ' , $ path );
9390
94- $ this ->assertStatusCode (200 , $ this -> client );
91+ $ this ->assertStatusCode (200 , static :: $ client );
9592
9693 $ this ->assertSame (1 ,
9794 $ crawler ->filter ('html > body ' )->count ());
@@ -127,13 +124,13 @@ public function testIndexAuthenticationLoginAs(): void
127124 $ loginAs
128125 );
129126
130- $ this -> client = static :: makeClient ();
127+ static :: $ client = $ this -> makeClient ();
131128
132129 $ path = '/ ' ;
133130
134- $ crawler = $ this -> client ->request ('GET ' , $ path );
131+ $ crawler = static :: $ client ->request ('GET ' , $ path );
135132
136- $ this ->assertStatusCode (200 , $ this -> client );
133+ $ this ->assertStatusCode (200 , static :: $ client );
137134
138135 $ this ->assertSame (1 ,
139136 $ crawler ->filter ('html > body ' )->count ());
@@ -171,12 +168,12 @@ public function testAllowedQueriesExceededException(): void
171168 $ this ->loginAs ($ repository ->getReference ('user ' ),
172169 'secured_area ' );
173170
174- $ this -> client = static :: makeClient ();
171+ static :: $ client = $ this -> makeClient ();
175172
176173 // One another query to load the second user.
177174 $ path = '/user/2 ' ;
178175
179- $ this -> client ->request ('GET ' , $ path );
176+ static :: $ client ->request ('GET ' , $ path );
180177 }
181178
182179 /**
@@ -194,13 +191,12 @@ public function testAnnotationAndException(): void
194191 $ this ->loadFixtures ([
195192 'Liip\Acme\Tests\App\DataFixtures\ORM\LoadUserData ' ,
196193 ]);
197-
198- $ this ->client = static ::makeClient ();
194+ static ::$ client = $ this ->makeClient ();
199195
200196 // One query to load the second user
201197 $ path = '/user/1 ' ;
202198
203- $ this -> client ->request ('GET ' , $ path );
199+ static :: $ client ->request ('GET ' , $ path );
204200 }
205201
206202 /**
0 commit comments