by
81 5
2
5
3,245
1
Top 1% !
Popular
Famous
Tagged
Specified
Popularity: 3998th place
This snippet is Public
LanguagePHP
LicenseMIT_X11

Check Content and Status Code in PHP Unit

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/63357/Check-Content-and-Status-Code-in-PHP-Uni?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
$client->request('GET', ‘/create/adviseeSet’); $content = $client->getResponse()->getContent(); $status = $client->getResponse()->getStatusCode(); $this->assertEquals('shmee', $content); $this->assertEquals(200, $status); Gives a nice failure message which prints out content and status code
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus