1
0
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:
David King
2012-11-16 09:23:57 -05:00
parent c9588572c9
commit 7691755883
16 changed files with 69 additions and 193 deletions

View File

@@ -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();
}
}

View File

@@ -1,6 +0,0 @@
<?php
class phpbb_ext_error_class_ext extends phpbb_extension_base
{
}

View File

@@ -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();
}
}

View File

@@ -1,6 +0,0 @@
<?php
class phpbb_ext_error_classtype_ext extends phpbb_extension_base
{
}

View File

@@ -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();
}
}

View File

@@ -1,6 +0,0 @@
<?php
class phpbb_ext_error_disabled_ext extends phpbb_extension_base
{
}

View File

@@ -0,0 +1,3 @@
foo_bar_controller:
pattern: /foo/bar
defaults: { _controller: foo_bar.controller:handle }

View File

@@ -0,0 +1,3 @@
services:
foo_bar.controller:
class: phpbb_ext_foo_bar_controller

View File

@@ -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();
}
}

View 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
View 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
{
}

View File

@@ -1,5 +0,0 @@
<!-- INCLUDE overall_header.html -->
<div id="welcome">This is for testing purposes.</div>
<!-- INCLUDE overall_footer.html -->

View File

@@ -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();
}
}

View File

@@ -1,6 +0,0 @@
<?php
class phpbb_ext_foobar_ext extends phpbb_extension_base
{
}

View File

@@ -1,5 +0,0 @@
<!-- INCLUDE overall_header.html -->
<div id="welcome">This is for testing purposes.</div>
<!-- INCLUDE overall_footer.html -->