mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-22 17:41:24 +02:00
Merge branch 'develop' into feature/merging-style-components
* develop: (175 commits) [feature/ajax] Remove strange non-breaking spaces from approve button [feature/ajax] Add entirely unrelated but nice newlines [feature/ajax] Unify phpbb_json_response instantiation [feature/ajax] Fix acp_styles activate_deactivate ajax callback name [feature/ajax] Send correct activate/deactivate JSON response in acp_profile [ticket/10270] Alter background colors for posts [feature/ajax] Remove not working module enable/disable ajax code [feature/ajax] Replace static call to phpbb_request with OO [feature/ajax] Remove quick-reply AJAX handling until we have something good [ticket/10270] Changing close button for ajax popups [ticket/10270] Disabling links in disappearing content [ticket/10291] Fixed an AJAX bug on quick reply form submit. [ticket/10273] Fixed accepting / denying posts AJAX. [ticket/10272] Removed code that was prevent event propogation in AJAX. [ticket/10291] Fixed a bug in the quick reply AJAX. [feature/ajax] Handle acp_modules error cases with JSON response [feature/ajax] Fix filter check, quick mod tools data-attribute [feature/ajax] Use the error handler [feature/ajax] Generic error handling with a phpbb.alert box [feature/ajax] Change filter semantics, some minor adjustments ... Conflicts: phpBB/adm/style/acp_styles.html phpBB/includes/acp/acp_styles.php
This commit is contained in:
29
tests/event/dispatcher_test.php
Normal file
29
tests/event/dispatcher_test.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) 2012 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
class phpbb_event_dispatcher_test extends phpbb_test_case
|
||||
{
|
||||
public function test_trigger_event()
|
||||
{
|
||||
$dispatcher = new phpbb_event_dispatcher();
|
||||
|
||||
$dispatcher->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);
|
||||
}
|
||||
}
|
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_controller implements phpbb_extension_controller_interface
|
||||
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/error/class/');
|
||||
|
||||
$template->set_filenames(array(
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
||||
|
@@ -5,8 +5,6 @@ class phpbb_ext_error_classtype_controller
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/error/classtype/');
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_error_disabled_controller implements phpbb_extension_controller_interface
|
||||
class phpbb_ext_error_disabled_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/error/disabled/');
|
||||
|
||||
$template->set_filenames(array(
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'index_body.html'
|
||||
));
|
||||
|
||||
|
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foo_bar_controller implements phpbb_extension_controller_interface
|
||||
class phpbb_ext_foo_bar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/foo/bar/');
|
||||
|
||||
$template->set_filenames(array(
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'foobar_body.html'
|
||||
));
|
||||
|
||||
|
@@ -1,13 +1,10 @@
|
||||
<?php
|
||||
|
||||
class phpbb_ext_foobar_controller implements phpbb_extension_controller_interface
|
||||
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||
{
|
||||
public function handle()
|
||||
{
|
||||
global $template;
|
||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/foobar/');
|
||||
|
||||
$template->set_filenames(array(
|
||||
$this->template->set_filenames(array(
|
||||
'body' => 'foobar_body.html'
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user