aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/extension_controller_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-05-28 14:55:04 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-05-28 14:55:04 +0200
commit467c4d62c44a32a1a60bed2e2a2519b10cdebd33 (patch)
treeff255cbbb902af4744594961f55729f6ec3e24c6 /tests/functional/extension_controller_test.php
parent6d9888be6504dee73341832c7de3d085f09da983 (diff)
downloadforums-467c4d62c44a32a1a60bed2e2a2519b10cdebd33.tar
forums-467c4d62c44a32a1a60bed2e2a2519b10cdebd33.tar.gz
forums-467c4d62c44a32a1a60bed2e2a2519b10cdebd33.tar.bz2
forums-467c4d62c44a32a1a60bed2e2a2519b10cdebd33.tar.xz
forums-467c4d62c44a32a1a60bed2e2a2519b10cdebd33.zip
[ticket/develop/11568] Do not directly access $client from tests
PHPBB3-11568
Diffstat (limited to 'tests/functional/extension_controller_test.php')
-rw-r--r--tests/functional/extension_controller_test.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/functional/extension_controller_test.php b/tests/functional/extension_controller_test.php
index f28b321942..7f1decd5b5 100644
--- a/tests/functional/extension_controller_test.php
+++ b/tests/functional/extension_controller_test.php
@@ -115,8 +115,9 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
public function test_missing_argument()
{
$this->phpbb_extension_manager->enable('foo/bar');
- $crawler = $this->request('GET', 'app.php?controller=foo/baz');
- $this->assertEquals(500, $this->client->getResponse()->getStatus());
+ $crawler = $this->request('GET', 'app.php?controller=foo/baz', false);
+ $this->request('GET', 'app.php?controller=foo/baz', false);
+ $this->assert_response_success(500);
$this->assertContains('Missing value for argument #1: test in class phpbb_ext_foo_bar_controller:baz', $crawler->filter('body')->text());
$this->phpbb_extension_manager->purge('foo/bar');
}
@@ -128,7 +129,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
{
$this->phpbb_extension_manager->enable('foo/bar');
$crawler = $this->request('GET', 'app.php?controller=foo/exception');
- $this->assertEquals(500, $this->client->getResponse()->getStatus());
+ $this->assert_response_success(500);
$this->assertContains('Exception thrown from foo/exception route', $crawler->filter('body')->text());
$this->phpbb_extension_manager->purge('foo/bar');
}
@@ -145,7 +146,7 @@ class phpbb_functional_extension_controller_test extends phpbb_functional_test_c
public function test_error_ext_disabled_or_404()
{
$crawler = $this->request('GET', 'app.php?controller=does/not/exist');
- $this->assertEquals(404, $this->client->getResponse()->getStatus());
+ $this->assert_response_success(404);
$this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text());
}
}