mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/controller] Adapt functional tests given new controller framework
PHPBB3-10864
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
||||
page_header('Test extension');
|
||||
page_footer();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_class_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_classtype_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
||||
page_header('Test extension');
|
||||
page_footer();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_classtype_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_disabled_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
||||
page_header('Test extension');
|
||||
page_footer();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_disabled_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
3
tests/functional/fixtures/ext/foo/bar/config/routing.yml
Executable file
3
tests/functional/fixtures/ext/foo/bar/config/routing.yml
Executable file
@@ -0,0 +1,3 @@
|
||||
foo_bar_controller:
|
||||
pattern: /foo/bar
|
||||
defaults: { _controller: foo_bar.controller:handle }
|
3
tests/functional/fixtures/ext/foo/bar/config/services.yml
Executable file
3
tests/functional/fixtures/ext/foo/bar/config/services.yml
Executable file
@@ -0,0 +1,3 @@
|
||||
services:
|
||||
foo_bar.controller:
|
||||
class: phpbb_ext_foo_bar_controller
|
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'foobar_body.html'
|
||||
));
|
||||
|
||||
page_header('Test extension');
|
||||
page_footer();
|
||||
}
|
||||
}
|
10
tests/functional/fixtures/ext/foo/bar/controller/controller.php
Executable file
10
tests/functional/fixtures/ext/foo/bar/controller/controller.php
Executable file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class phpbb_ext_foo_bar_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
return new Response('foo/bar controller handle() method', 200);
|
||||
}
|
||||
}
|
12
tests/functional/fixtures/ext/foo/bar/ext.php
Normal file → Executable file
12
tests/functional/fixtures/ext/foo/bar/ext.php
Normal file → Executable file
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
||||
|
@@ -1,5 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<div id="welcome">This is for testing purposes.</div>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'foobar_body.html'
|
||||
));
|
||||
|
||||
page_header('Test extension');
|
||||
page_footer();
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_ext extends phpbb_extension_base
|
||||
{
|
||||
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<div id="welcome">This is for testing purposes.</div>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
Reference in New Issue
Block a user