1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

Merge branch 'develop-olympus' into develop

* develop-olympus:
  [ticket/11202] Custom message does not make sense here, delete it.
  [ticket/11202] Check response success before content assertions.
  [ticket/11202] Add a heuristic function to check for response success.

Conflicts:
	tests/test_framework/phpbb_functional_test_case.php
This commit is contained in:
Andreas Fischer
2012-11-15 20:24:37 +01:00
2 changed files with 18 additions and 0 deletions

View File

@@ -343,4 +343,19 @@ class phpbb_functional_test_case extends phpbb_test_case
{
$this->assertContains(html_entity_decode($this->lang($needle), ENT_QUOTES), $haystack, $message);
}
/**
* Heuristic function to check that the response is success.
*
* When php decides to die with a fatal error, it still sends 200 OK
* status code. This assertion tries to catch that.
*
* @return null
*/
public function assert_response_success()
{
$this->assertEquals(200, $this->client->getResponse()->getStatus());
$content = $this->client->getResponse()->getContent();
$this->assertNotContains('Fatal error:', $content);
}
}