aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension/ext/foo
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/foo
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/foo')
-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
12 files changed, 40 insertions, 14 deletions
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
{
}