mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-26 13:18:54 +00:00
[ticket/11568] Invert logic for asserting the response
PHPBB3-11568
This commit is contained in:
parent
b7b81f6431
commit
b2be82cd57
1 changed files with 4 additions and 4 deletions
|
@ -83,11 +83,11 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
* @param bool $skip_assert_response_success Should we skip the basic response assertions?
|
* @param bool $skip_assert_response_success Should we skip the basic response assertions?
|
||||||
* @return Symfony\Component\DomCrawler\Crawler
|
* @return Symfony\Component\DomCrawler\Crawler
|
||||||
*/
|
*/
|
||||||
static public function request($method, $path, $form_data = array(), $skip_assert_response_success = false)
|
static public function request($method, $path, $form_data = array(), $assert_response_success = true)
|
||||||
{
|
{
|
||||||
$crawler = self::$client->request($method, self::$root_url . $path, $form_data);
|
$crawler = self::$client->request($method, self::$root_url . $path, $form_data);
|
||||||
|
|
||||||
if (!$skip_assert_response_success)
|
if ($assert_response_success)
|
||||||
{
|
{
|
||||||
self::assert_response_success();
|
self::assert_response_success();
|
||||||
}
|
}
|
||||||
|
@ -103,11 +103,11 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
* @param bool $skip_assert_response_success Should we skip the basic response assertions?
|
* @param bool $skip_assert_response_success Should we skip the basic response assertions?
|
||||||
* @return Symfony\Component\DomCrawler\Crawler
|
* @return Symfony\Component\DomCrawler\Crawler
|
||||||
*/
|
*/
|
||||||
static public function submit(Symfony\Component\DomCrawler\Form $form, array $values = array(), $skip_assert_response_success = false)
|
static public function submit(Symfony\Component\DomCrawler\Form $form, array $values = array(), $assert_response_success = true)
|
||||||
{
|
{
|
||||||
$crawler = self::$client->submit($form, $values);
|
$crawler = self::$client->submit($form, $values);
|
||||||
|
|
||||||
if (!$skip_assert_response_success)
|
if ($assert_response_success)
|
||||||
{
|
{
|
||||||
self::assert_response_success();
|
self::assert_response_success();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue