aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension/ext
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-09-17 16:15:44 +0200
committerNils Adermann <naderman@naderman.de>2013-09-17 16:15:44 +0200
commitc4b53490ad93566914cbc280910c67b75346a665 (patch)
tree206652fbbe1a3d0f3871a5342eef0b519773a079 /tests/extension/ext
parentd12f35885539c8bd7d2d795d9fc5638d022698bb (diff)
downloadforums-c4b53490ad93566914cbc280910c67b75346a665.tar
forums-c4b53490ad93566914cbc280910c67b75346a665.tar.gz
forums-c4b53490ad93566914cbc280910c67b75346a665.tar.bz2
forums-c4b53490ad93566914cbc280910c67b75346a665.tar.xz
forums-c4b53490ad93566914cbc280910c67b75346a665.zip
[ticket/11700] Correctly load extensions with nonprefixed namespaces
PHPBB3-11700
Diffstat (limited to 'tests/extension/ext')
-rw-r--r--tests/extension/ext/bar/ext.php4
-rw-r--r--tests/extension/ext/barfoo/acp/a_info.php6
-rw-r--r--tests/extension/ext/barfoo/acp/a_module.php4
-rw-r--r--tests/extension/ext/barfoo/ext.php4
-rw-r--r--tests/extension/ext/foo/a_class.php4
-rw-r--r--tests/extension/ext/foo/acp/a_info.php6
-rw-r--r--tests/extension/ext/foo/acp/a_module.php4
-rw-r--r--tests/extension/ext/foo/acp/fail_info.php5
-rw-r--r--tests/extension/ext/foo/acp/fail_module.php5
-rw-r--r--tests/extension/ext/foo/b_class.php4
-rw-r--r--tests/extension/ext/foo/ext.php4
-rw-r--r--tests/extension/ext/foo/mcp/a_info.php6
-rw-r--r--tests/extension/ext/foo/mcp/a_module.php4
-rw-r--r--tests/extension/ext/foo/sub/type/alternative.php4
-rw-r--r--tests/extension/ext/foo/type/alternative.php4
-rw-r--r--tests/extension/ext/foo/typewrong/error.php4
-rw-r--r--tests/extension/ext/vendor/moo/ext.php4
-rw-r--r--tests/extension/ext/vendor/moo/feature_class.php4
18 files changed, 59 insertions, 21 deletions
diff --git a/tests/extension/ext/bar/ext.php b/tests/extension/ext/bar/ext.php
index edae25663a..22ff5e8077 100644
--- a/tests/extension/ext/bar/ext.php
+++ b/tests/extension/ext/bar/ext.php
@@ -1,6 +1,8 @@
<?php
-class phpbb_ext_bar_ext extends \phpbb\extension\base
+namespace bar;
+
+class ext extends \phpbb\extension\base
{
static public $state;
diff --git a/tests/extension/ext/barfoo/acp/a_info.php b/tests/extension/ext/barfoo/acp/a_info.php
index cd7e4e574b..ea07189f7a 100644
--- a/tests/extension/ext/barfoo/acp/a_info.php
+++ b/tests/extension/ext/barfoo/acp/a_info.php
@@ -1,11 +1,13 @@
<?php
-class phpbb_ext_barfoo_acp_a_info
+namespace barfoo\acp;
+
+class a_info
{
public function module()
{
return array(
- 'filename' => 'phpbb_ext_barfoo_acp_a_module',
+ 'filename' => 'barfoo\\acp\\a_module',
'title' => 'Barfoo',
'version' => '3.1.0-dev',
'modes' => array(
diff --git a/tests/extension/ext/barfoo/acp/a_module.php b/tests/extension/ext/barfoo/acp/a_module.php
index 5bedb49645..0ae8775013 100644
--- a/tests/extension/ext/barfoo/acp/a_module.php
+++ b/tests/extension/ext/barfoo/acp/a_module.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_barfoo_acp_a_module
+namespace barfoo\acp;
+
+class a_module
{
}
diff --git a/tests/extension/ext/barfoo/ext.php b/tests/extension/ext/barfoo/ext.php
index c1425369fa..1b7bb7ca5e 100644
--- a/tests/extension/ext/barfoo/ext.php
+++ b/tests/extension/ext/barfoo/ext.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_barfoo_ext extends \phpbb\extension\base
+namespace barfoo;
+
+class ext extends \phpbb\extension\base
{
}
diff --git a/tests/extension/ext/foo/a_class.php b/tests/extension/ext/foo/a_class.php
index b7be1ad654..9db45a697f 100644
--- a/tests/extension/ext/foo/a_class.php
+++ b/tests/extension/ext/foo/a_class.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_a_class
+namespace foo;
+
+class a_class
{
}
diff --git a/tests/extension/ext/foo/acp/a_info.php b/tests/extension/ext/foo/acp/a_info.php
index 3e9bbffaca..3b7d8cdd42 100644
--- a/tests/extension/ext/foo/acp/a_info.php
+++ b/tests/extension/ext/foo/acp/a_info.php
@@ -1,11 +1,13 @@
<?php
-class phpbb_ext_foo_acp_a_info
+namespace foo\acp;
+
+class a_info
{
public function module()
{
return array(
- 'filename' => 'phpbb_ext_foo_acp_a_module',
+ 'filename' => 'foo\\acp\\a_module',
'title' => 'Foobar',
'version' => '3.1.0-dev',
'modes' => array(
diff --git a/tests/extension/ext/foo/acp/a_module.php b/tests/extension/ext/foo/acp/a_module.php
index 093b4b1ad7..7aa2351ab3 100644
--- a/tests/extension/ext/foo/acp/a_module.php
+++ b/tests/extension/ext/foo/acp/a_module.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_acp_a_module
+namespace foo\acp;
+
+class a_module
{
}
diff --git a/tests/extension/ext/foo/acp/fail_info.php b/tests/extension/ext/foo/acp/fail_info.php
index 99aa09551e..caea441f99 100644
--- a/tests/extension/ext/foo/acp/fail_info.php
+++ b/tests/extension/ext/foo/acp/fail_info.php
@@ -1,9 +1,12 @@
<?php
+
+namespace foo\acp;
+
/*
* Due to the mismatch between the class name and the file name, this module
* file shouldn't be found by the extension finder
*/
-class phpbb_ext_foo_acp_foo_info
+class foo_info
{
public function module()
{
diff --git a/tests/extension/ext/foo/acp/fail_module.php b/tests/extension/ext/foo/acp/fail_module.php
index a200d92d2f..8070929d3c 100644
--- a/tests/extension/ext/foo/acp/fail_module.php
+++ b/tests/extension/ext/foo/acp/fail_module.php
@@ -1,8 +1,11 @@
<?php
+
+namespace foo\acp;
+
/*
* Due to the mismatch between the class name and the file name of the module
* info file, this module's info file shouldn't be found
*/
-class phpbb_ext_foo_acp_fail_module
+class fail_module
{
}
diff --git a/tests/extension/ext/foo/b_class.php b/tests/extension/ext/foo/b_class.php
index 4645266122..bb2a77c05e 100644
--- a/tests/extension/ext/foo/b_class.php
+++ b/tests/extension/ext/foo/b_class.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_b_class
+namespace foo;
+
+class b_class
{
}
diff --git a/tests/extension/ext/foo/ext.php b/tests/extension/ext/foo/ext.php
index f604dcab5f..ac6098f2f1 100644
--- a/tests/extension/ext/foo/ext.php
+++ b/tests/extension/ext/foo/ext.php
@@ -1,6 +1,8 @@
<?php
-class phpbb_ext_foo_ext extends \phpbb\extension\base
+namespace foo;
+
+class ext extends \phpbb\extension\base
{
static public $disabled;
diff --git a/tests/extension/ext/foo/mcp/a_info.php b/tests/extension/ext/foo/mcp/a_info.php
index 84a36b9134..9a896ce808 100644
--- a/tests/extension/ext/foo/mcp/a_info.php
+++ b/tests/extension/ext/foo/mcp/a_info.php
@@ -1,11 +1,13 @@
<?php
-class phpbb_ext_foo_mcp_a_info
+namespace foo\mcp;
+
+class a_info
{
public function module()
{
return array(
- 'filename' => 'phpbb_ext_foo_mcp_a_module',
+ 'filename' => 'foo\\mcp\\a_module',
'title' => 'Foobar',
'version' => '3.1.0-dev',
'modes' => array(
diff --git a/tests/extension/ext/foo/mcp/a_module.php b/tests/extension/ext/foo/mcp/a_module.php
index 59d9f8cc6f..ca397e7004 100644
--- a/tests/extension/ext/foo/mcp/a_module.php
+++ b/tests/extension/ext/foo/mcp/a_module.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_mcp_a_module
+namespace foo\mcp;
+
+class a_module
{
}
diff --git a/tests/extension/ext/foo/sub/type/alternative.php b/tests/extension/ext/foo/sub/type/alternative.php
index 2ea7353f4b..1eaf794609 100644
--- a/tests/extension/ext/foo/sub/type/alternative.php
+++ b/tests/extension/ext/foo/sub/type/alternative.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_sub_type_alternative
+namespace foo\sub\type;
+
+class alternative
{
}
diff --git a/tests/extension/ext/foo/type/alternative.php b/tests/extension/ext/foo/type/alternative.php
index 404b66b965..8f753491ef 100644
--- a/tests/extension/ext/foo/type/alternative.php
+++ b/tests/extension/ext/foo/type/alternative.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_type_alternative
+namespace foo\type;
+
+class alternative
{
}
diff --git a/tests/extension/ext/foo/typewrong/error.php b/tests/extension/ext/foo/typewrong/error.php
index ba22cfae9a..5020926043 100644
--- a/tests/extension/ext/foo/typewrong/error.php
+++ b/tests/extension/ext/foo/typewrong/error.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_foo_typewrong_error
+namespace foo\typewrong;
+
+class error
{
}
diff --git a/tests/extension/ext/vendor/moo/ext.php b/tests/extension/ext/vendor/moo/ext.php
index 82657ece77..41ef570452 100644
--- a/tests/extension/ext/vendor/moo/ext.php
+++ b/tests/extension/ext/vendor/moo/ext.php
@@ -1,6 +1,8 @@
<?php
-class phpbb_ext_vendor_moo_ext extends \phpbb\extension\base
+namespace vendor\moo;
+
+class ext extends \phpbb\extension\base
{
static public $purged;
diff --git a/tests/extension/ext/vendor/moo/feature_class.php b/tests/extension/ext/vendor/moo/feature_class.php
index c3bcc4451c..cb8bb3da56 100644
--- a/tests/extension/ext/vendor/moo/feature_class.php
+++ b/tests/extension/ext/vendor/moo/feature_class.php
@@ -1,5 +1,7 @@
<?php
-class phpbb_ext_vendor_moo_feature_class
+namespace vendor\moo;
+
+class feature_class
{
}