File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ console::
370370
371371 // the output of the command in the console
372372 $output = $commandTester->getDisplay();
373- $this->assertContains ('Username: Wouter', $output);
373+ $this->assertStringContainsString ('Username: Wouter', $output);
374374
375375 // ...
376376 }
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ resolver. Modify the framework to make use of them::
4949 namespace Simplex;
5050
5151 // ...
52-
52+
5353 use Calendar\Controller\LeapYearController;
5454 use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
5555 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
@@ -183,7 +183,7 @@ Response::
183183 $response = $framework->handle(new Request());
184184
185185 $this->assertEquals(200, $response->getStatusCode());
186- $this->assertContains ('Yep, this is a leap year!', $response->getContent());
186+ $this->assertStringContainsString ('Yep, this is a leap year!', $response->getContent());
187187 }
188188
189189In this test, we simulate a route that matches and returns a simple
Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ Or test against the response content directly if you just want to assert that
270270the content contains some text or in case that the response is not an XML/HTML
271271document::
272272
273- $this->assertContains (
273+ $this->assertStringContainsString (
274274 'Hello World',
275275 $client->getResponse()->getContent()
276276 );
@@ -316,7 +316,7 @@ document::
316316 );
317317
318318 // asserts that the response content contains a string
319- $this->assertContains ('foo', $client->getResponse()->getContent());
319+ $this->assertStringContainsString ('foo', $client->getResponse()->getContent());
320320 // ...or matches a regex
321321 $this->assertRegExp('/foo(bar)?/', $client->getResponse()->getContent());
322322
You can’t perform that action at this time.
0 commit comments