From d3e2fae66d74f79ef7dcfe2e24f47efaa5c106e2 Mon Sep 17 00:00:00 2001 From: David King Date: Fri, 15 Feb 2013 16:48:43 -0500 Subject: [ticket/11334] Add a test for the controller helper URL method PHPBB3-11334 --- tests/controller/controller_test.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 198fb3c6dd..97f6d6152a 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -40,6 +40,12 @@ class phpbb_controller_test extends phpbb_test_case $this->assertEquals(2, sizeof($routes)); } + public function test_controller_url_helper() + { + $helper = new phpbb_controller_helper; + $this->assertEquals($helper->url('foo/bar'),'./app.php?controller=foo/bar'); + } + public function test_controller_resolver() { $container = new ContainerBuilder(); -- cgit v1.2.1 From 48aefb13b0f66dd84f5e7a2f18ca485fabe4833b Mon Sep 17 00:00:00 2001 From: David King Date: Sat, 16 Feb 2013 19:18:16 -0500 Subject: [ticket/11334] Make $phpbb_dispatcher global, as done in append_sid test PHPBB3-11334 --- tests/controller/controller_test.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 97f6d6152a..c4818dbd6a 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -42,6 +42,9 @@ class phpbb_controller_test extends phpbb_test_case public function test_controller_url_helper() { + global $phpbb_dispatcher; + + $phpbb_dispatcher = new phpbb_mock_event_dispatcher; $helper = new phpbb_controller_helper; $this->assertEquals($helper->url('foo/bar'),'./app.php?controller=foo/bar'); } -- cgit v1.2.1 From cd697e68129868dc811c141660652360e0f0f983 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Mar 2013 13:35:00 +0100 Subject: [ticket/11334] Include functions.php and fix class name in tests PHPBB3-11334 --- tests/controller/controller_test.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index c4818dbd6a..8cdedb27e2 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -7,6 +7,8 @@ * */ +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; + use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; @@ -14,7 +16,7 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -class phpbb_controller_test extends phpbb_test_case +class phpbb_controller_controller_test extends phpbb_test_case { public function setUp() { -- cgit v1.2.1 From 9259e635cacce34699115b909f256f9302ec3aaa Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 15 Mar 2013 14:01:15 +0100 Subject: [ticket/11334] Move unit tests for helper->url() into own file PHPBB3-11334 --- tests/controller/controller_test.php | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 8cdedb27e2..c06bf7d548 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -7,8 +7,6 @@ * */ -require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; - use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; @@ -42,15 +40,6 @@ class phpbb_controller_controller_test extends phpbb_test_case $this->assertEquals(2, sizeof($routes)); } - public function test_controller_url_helper() - { - global $phpbb_dispatcher; - - $phpbb_dispatcher = new phpbb_mock_event_dispatcher; - $helper = new phpbb_controller_helper; - $this->assertEquals($helper->url('foo/bar'),'./app.php?controller=foo/bar'); - } - public function test_controller_resolver() { $container = new ContainerBuilder(); -- cgit v1.2.1 From 7030578bbe9e11c18b5becaf8b06e670e3c2e3cd Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 14 Jul 2013 01:32:34 -0400 Subject: [ticket/11698] Moving all autoloadable files to phpbb/ PHPBB3-11698 --- tests/controller/controller_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller/controller_test.php') diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index c06bf7d548..dfc4f80469 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -59,7 +59,7 @@ class phpbb_controller_controller_test extends phpbb_test_case } if (!class_exists('phpbb_controller_foo')) { - include(__DIR__.'/includes/controller/foo.php'); + include(__DIR__.'/phpbb/controller/foo.php'); } $resolver = new phpbb_controller_resolver(new phpbb_user, $container); -- cgit v1.2.1