aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension/ext/vendor2
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extension/ext/vendor2')
-rw-r--r--tests/extension/ext/vendor2/bar/acp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/bar/acp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/bar/composer.json23
-rw-r--r--tests/extension/ext/vendor2/bar/ext.php26
-rw-r--r--tests/extension/ext/vendor2/bar/migrations/migration.php18
-rw-r--r--tests/extension/ext/vendor2/foo/a_class.php7
-rw-r--r--tests/extension/ext/vendor2/foo/acp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/foo/acp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/foo/acp/fail_info.php22
-rw-r--r--tests/extension/ext/vendor2/foo/acp/fail_module.php11
-rw-r--r--tests/extension/ext/vendor2/foo/b_class.php7
-rw-r--r--tests/extension/ext/vendor2/foo/composer.json23
-rw-r--r--tests/extension/ext/vendor2/foo/ext.php15
-rw-r--r--tests/extension/ext/vendor2/foo/mcp/a_info.php18
-rw-r--r--tests/extension/ext/vendor2/foo/mcp/a_module.php7
-rw-r--r--tests/extension/ext/vendor2/foo/sub/type/alternative.php7
-rw-r--r--tests/extension/ext/vendor2/foo/type/alternative.php7
-rw-r--r--tests/extension/ext/vendor2/foo/type/dummy/empty.txt0
-rw-r--r--tests/extension/ext/vendor2/foo/typewrong/error.php7
19 files changed, 248 insertions, 0 deletions
diff --git a/tests/extension/ext/vendor2/bar/acp/a_info.php b/tests/extension/ext/vendor2/bar/acp/a_info.php
new file mode 100644
index 0000000000..8132df587f
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/acp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\bar\acp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\bar\\acp\\a_module',
+ 'title' => 'Bar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/bar/acp/a_module.php b/tests/extension/ext/vendor2/bar/acp/a_module.php
new file mode 100644
index 0000000000..3a3d105790
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/acp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\bar\acp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/bar/composer.json b/tests/extension/ext/vendor2/bar/composer.json
new file mode 100644
index 0000000000..9d2ed86a0c
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "vendor2/bar",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GPL-2.0",
+ "authors": [{
+ "name": "John Smith",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3"
+ },
+ "extra": {
+ "display-name": "phpBB Bar Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
+ }
+}
diff --git a/tests/extension/ext/vendor2/bar/ext.php b/tests/extension/ext/vendor2/bar/ext.php
new file mode 100644
index 0000000000..f94ab9ad81
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/ext.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace vendor2\bar;
+
+class ext extends \phpbb\extension\base
+{
+ static public $state;
+
+ public function enable_step($old_state)
+ {
+ // run 4 steps, then quit
+ if ($old_state === 4)
+ {
+ return false;
+ }
+
+ if ($old_state === false)
+ {
+ $old_state = 0;
+ }
+
+ self::$state = ++$old_state;
+
+ return self::$state;
+ }
+}
diff --git a/tests/extension/ext/vendor2/bar/migrations/migration.php b/tests/extension/ext/vendor2/bar/migrations/migration.php
new file mode 100644
index 0000000000..71caa34fd9
--- /dev/null
+++ b/tests/extension/ext/vendor2/bar/migrations/migration.php
@@ -0,0 +1,18 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace vendor2\bar\migrations;
+
+class migration extends \phpbb\db\migration\migration
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/a_class.php b/tests/extension/ext/vendor2/foo/a_class.php
new file mode 100644
index 0000000000..06278c0e0c
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/a_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo;
+
+class a_class
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/a_info.php b/tests/extension/ext/vendor2/foo/acp/a_info.php
new file mode 100644
index 0000000000..e1eaa340b7
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\foo\\acp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => 'ext_vendor2/foo', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/a_module.php b/tests/extension/ext/vendor2/foo/acp/a_module.php
new file mode 100644
index 0000000000..78d91af2fe
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo\acp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/fail_info.php b/tests/extension/ext/vendor2/foo/acp/fail_info.php
new file mode 100644
index 0000000000..d9b4353957
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/fail_info.php
@@ -0,0 +1,22 @@
+<?php
+
+namespace vendor2\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 foo_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\foo\acp\fail_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('ACP_MODS')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/acp/fail_module.php b/tests/extension/ext/vendor2/foo/acp/fail_module.php
new file mode 100644
index 0000000000..c8a5eae745
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/acp/fail_module.php
@@ -0,0 +1,11 @@
+<?php
+
+namespace vendor2\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 fail_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/b_class.php b/tests/extension/ext/vendor2/foo/b_class.php
new file mode 100644
index 0000000000..3d0f193908
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/b_class.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo;
+
+class b_class
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/composer.json b/tests/extension/ext/vendor2/foo/composer.json
new file mode 100644
index 0000000000..efcdfc338f
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "vendor2/foo",
+ "type": "phpbb-extension",
+ "description": "An example/sample extension to be used for testing purposes in phpBB Development.",
+ "version": "1.0.0",
+ "time": "2012-02-15 01:01:01",
+ "license": "GPL-2.0",
+ "authors": [{
+ "name": "John Smith",
+ "email": "email@phpbb.com",
+ "homepage": "http://phpbb.com",
+ "role": "N/A"
+ }],
+ "require": {
+ "php": ">=5.3"
+ },
+ "extra": {
+ "display-name": "phpBB Foo Extension",
+ "soft-require": {
+ "phpbb/phpbb": "3.1.*@dev"
+ }
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/ext.php b/tests/extension/ext/vendor2/foo/ext.php
new file mode 100644
index 0000000000..15480fe92a
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/ext.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace vendor2\foo;
+
+class ext extends \phpbb\extension\base
+{
+ static public $disabled;
+
+ public function disable_step($old_state)
+ {
+ self::$disabled = true;
+
+ return false;
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/mcp/a_info.php b/tests/extension/ext/vendor2/foo/mcp/a_info.php
new file mode 100644
index 0000000000..b5599fde65
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/mcp/a_info.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace vendor2\foo\mcp;
+
+class a_info
+{
+ public function module()
+ {
+ return array(
+ 'filename' => 'vendor2\\foo\\mcp\\a_module',
+ 'title' => 'Foobar',
+ 'version' => '3.1.0-dev',
+ 'modes' => array(
+ 'config' => array('title' => 'Config', 'auth' => '', 'cat' => array('MCP_MAIN')),
+ ),
+ );
+ }
+}
diff --git a/tests/extension/ext/vendor2/foo/mcp/a_module.php b/tests/extension/ext/vendor2/foo/mcp/a_module.php
new file mode 100644
index 0000000000..fe29783827
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/mcp/a_module.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace vendor2\foo\mcp;
+
+class a_module
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/sub/type/alternative.php b/tests/extension/ext/vendor2/foo/sub/type/alternative.php
new file mode 100644
index 0000000000..1eaf794609
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/sub/type/alternative.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\sub\type;
+
+class alternative
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/type/alternative.php b/tests/extension/ext/vendor2/foo/type/alternative.php
new file mode 100644
index 0000000000..8f753491ef
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/type/alternative.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\type;
+
+class alternative
+{
+}
diff --git a/tests/extension/ext/vendor2/foo/type/dummy/empty.txt b/tests/extension/ext/vendor2/foo/type/dummy/empty.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/type/dummy/empty.txt
diff --git a/tests/extension/ext/vendor2/foo/typewrong/error.php b/tests/extension/ext/vendor2/foo/typewrong/error.php
new file mode 100644
index 0000000000..5020926043
--- /dev/null
+++ b/tests/extension/ext/vendor2/foo/typewrong/error.php
@@ -0,0 +1,7 @@
+<?php
+
+namespace foo\typewrong;
+
+class error
+{
+}