From e02d92ac62fbe1dc08994444c18a7447d72c56e6 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 11 Mar 2012 15:14:13 +0100 Subject: [feature/event-dispatcher] Use real EventDispatcher through composer * replace the copy-pasta EventDispatcher with the real one from Symfony2 * use composer for managing this dependency, use composer autoloading PHPBB3-9550 --- tests/bootstrap.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index bf946df381..63e6f4b280 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -29,6 +29,8 @@ else define('STRIP', (get_magic_quotes_gpc()) ? true : false); } +require_once $phpbb_root_path . 'vendor/.composer/autoload.php'; + require_once $phpbb_root_path . 'includes/constants.php'; require_once $phpbb_root_path . 'includes/class_loader.' . $phpEx; -- cgit v1.2.1 From 0af7d610c08307fbe8df20e0d44e54dcb9429d64 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Sat, 17 Mar 2012 22:45:27 -0400 Subject: [feature/event-dispatcher] Delete hard dependency on composer. Applications should not depend on package managers. PHPBB3-9550 --- tests/bootstrap.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests') diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 3544c66c3d..302701e3b3 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -12,8 +12,6 @@ $phpbb_root_path = 'phpBB/'; $phpEx = 'php'; require_once $phpbb_root_path . 'includes/startup.php'; -require_once $phpbb_root_path . 'vendor/.composer/autoload.php'; - $table_prefix = 'phpbb_'; require_once $phpbb_root_path . 'includes/constants.php'; require_once $phpbb_root_path . 'includes/class_loader.' . $phpEx; -- cgit v1.2.1 From 400277c03624788e6a31f9aa4a15b883478f58cc Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 24 Mar 2012 15:45:18 +0100 Subject: [feature/event-dispatcher] Change phpbb_event_dispatcher to inheritance, tests PHPBB3-9550 --- tests/event/dispatcher_test.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/event/dispatcher_test.php (limited to 'tests') diff --git a/tests/event/dispatcher_test.php b/tests/event/dispatcher_test.php new file mode 100644 index 0000000000..59e51b1cdc --- /dev/null +++ b/tests/event/dispatcher_test.php @@ -0,0 +1,29 @@ +addListener('core.test_event', function (phpbb_event_data $event) { + $event['foo'] = $event['foo'] . '2'; + $event['bar'] = $event['bar'] . '2'; + }); + + $foo = 'foo'; + $bar = 'bar'; + + $vars = array('foo', 'bar'); + $result = $dispatcher->trigger_event('core.test_event', compact($vars)); + + $this->assertSame(array('foo' => 'foo2', 'bar' => 'bar2'), $result); + } +} -- cgit v1.2.1 From 951e2c8d0c32e6c2bcae02e2f2ff8be35af35b36 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Fri, 30 Mar 2012 14:22:20 +0200 Subject: [feature/event-dispatcher] Fix copyright years PHPBB3-9550 --- tests/event/dispatcher_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/event/dispatcher_test.php b/tests/event/dispatcher_test.php index 59e51b1cdc..f8fe060d99 100644 --- a/tests/event/dispatcher_test.php +++ b/tests/event/dispatcher_test.php @@ -2,7 +2,7 @@ /** * * @package testing -* @copyright (c) 2010 phpBB Group +* @copyright (c) 2012 phpBB Group * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ -- cgit v1.2.1