Dealing with HTTP Status Codes in PHPUnit_Extensions_Selenium2TestCase
- by frosty
I have a series of tests that I'm running for an Open Source Project, I'd like to get the status code of the curl request that is made to determine the difference of a code change breaking functionality vs a code change breaking the site completely.
class ExampleTest extends PHPUnit_Extensions_Selenium2TestCase
{
public function setUp()
{
$this->setBrowser('firefox');
$this->setBrowserUrl('http://localhost');
}
public function testForError()
{
$this->url('/');
$this->assertNotEmpty($this->title());
}
}
That's an example of how I'm going about it now, but I'd like to have some concrete information. Short of getting the information from the CURL request, I'm not really sure how to go about this...