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::
370
370
371
371
// the output of the command in the console
372
372
$output = $commandTester->getDisplay();
373
- $this->assertContains ('Username: Wouter', $output);
373
+ $this->assertStringContainsString ('Username: Wouter', $output);
374
374
375
375
// ...
376
376
}
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