mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[feature/controller] Fix line endings and permissions, and check responses
PHPBB3-10864
This commit is contained in:
parent
abf2575bdb
commit
4efbb893b7
5 changed files with 10 additions and 6 deletions
|
@ -91,6 +91,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/foo/bar');
|
||||
$this->assert_response_success();
|
||||
$this->assertContains("foo/bar controller handle() method", $crawler->filter('body')->text());
|
||||
$this->phpbb_extension_manager->purge('foo/bar');
|
||||
}
|
||||
|
@ -102,6 +103,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/foo/template');
|
||||
$this->assert_response_success();
|
||||
$this->assertContains("I am a variable", $crawler->filter('#content')->text());
|
||||
$this->phpbb_extension_manager->purge('foo/bar');
|
||||
}
|
||||
|
@ -114,6 +116,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/foo/baz');
|
||||
$this->assertEquals(404, $this->client->getResponse()->getStatus());
|
||||
$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');
|
||||
}
|
||||
|
@ -130,6 +133,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/does/not/exist');
|
||||
$this->assertEquals(404, $this->client->getResponse()->getStatus());
|
||||
$this->assertContains('No route found for "GET /does/not/exist"', $crawler->filter('body')->text());
|
||||
}
|
||||
}
|
||||
|
|
0
tests/functional/fixtures/ext/foo/bar/config/routing.yml
Executable file → Normal file
0
tests/functional/fixtures/ext/foo/bar/config/routing.yml
Executable file → Normal file
0
tests/functional/fixtures/ext/foo/bar/config/services.yml
Executable file → Normal file
0
tests/functional/fixtures/ext/foo/bar/config/services.yml
Executable file → Normal file
0
tests/functional/fixtures/ext/foo/bar/controller/controller.php
Executable file → Normal file
0
tests/functional/fixtures/ext/foo/bar/controller/controller.php
Executable file → Normal file
12
tests/functional/fixtures/ext/foo/bar/ext.php
Executable file → Normal file
12
tests/functional/fixtures/ext/foo/bar/ext.php
Executable file → Normal file
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue