File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ console::
356
356
357
357
// the output of the command in the console
358
358
$output = $commandTester->getDisplay();
359
- $this->assertContains ('Username: Wouter', $output);
359
+ $this->assertStringContainsString ('Username: Wouter', $output);
360
360
361
361
// ...
362
362
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ resolver. Modify the framework to make use of them::
49
49
namespace Simplex;
50
50
51
51
// ...
52
-
52
+
53
53
use Calendar\Controller\LeapYearController;
54
54
use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
55
55
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
@@ -183,7 +183,7 @@ Response::
183
183
$response = $framework->handle(new Request());
184
184
185
185
$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());
187
187
}
188
188
189
189
In 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
270
270
the content contains some text or in case that the response is not an XML/HTML
271
271
document::
272
272
273
- $this->assertContains (
273
+ $this->assertStringContainsString (
274
274
'Hello World',
275
275
$client->getResponse()->getContent()
276
276
);
@@ -316,7 +316,7 @@ document::
316
316
);
317
317
318
318
// asserts that the response content contains a string
319
- $this->assertContains ('foo', $client->getResponse()->getContent());
319
+ $this->assertStringContainsString ('foo', $client->getResponse()->getContent());
320
320
// ...or matches a regex
321
321
$this->assertRegExp('/foo(bar)?/', $client->getResponse()->getContent());
322
322
You can’t perform that action at this time.
0 commit comments