diff options
Diffstat (limited to 'tests/extension/ext')
-rw-r--r-- | tests/extension/ext/bar/ext.php | 24 | ||||
-rw-r--r-- | tests/extension/ext/bar/my/hidden_class.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/foo/a_class.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/foo/b_class.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/foo/composer.json | 22 | ||||
-rw-r--r-- | tests/extension/ext/foo/ext.php | 13 | ||||
-rw-r--r-- | tests/extension/ext/foo/sub/type/alternative.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/foo/type/alternative.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/foo/type/dummy/empty.txt | 0 | ||||
-rw-r--r-- | tests/extension/ext/foo/typewrong/error.php | 5 | ||||
-rw-r--r-- | tests/extension/ext/vendor/moo/composer.json | 22 | ||||
-rw-r--r-- | tests/extension/ext/vendor/moo/ext.php | 13 | ||||
-rw-r--r-- | tests/extension/ext/vendor/moo/feature_class.php | 5 |
13 files changed, 129 insertions, 0 deletions
diff --git a/tests/extension/ext/bar/ext.php b/tests/extension/ext/bar/ext.php new file mode 100644 index 0000000000..5585edf9ac --- /dev/null +++ b/tests/extension/ext/bar/ext.php @@ -0,0 +1,24 @@ +<?php + +class phpbb_ext_bar_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/bar/my/hidden_class.php b/tests/extension/ext/bar/my/hidden_class.php new file mode 100644 index 0000000000..0261d7c59a --- /dev/null +++ b/tests/extension/ext/bar/my/hidden_class.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_bar_my_hidden_class +{ +} diff --git a/tests/extension/ext/foo/a_class.php b/tests/extension/ext/foo/a_class.php new file mode 100644 index 0000000000..b7be1ad654 --- /dev/null +++ b/tests/extension/ext/foo/a_class.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_foo_a_class +{ +} diff --git a/tests/extension/ext/foo/b_class.php b/tests/extension/ext/foo/b_class.php new file mode 100644 index 0000000000..4645266122 --- /dev/null +++ b/tests/extension/ext/foo/b_class.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_foo_b_class +{ +} diff --git a/tests/extension/ext/foo/composer.json b/tests/extension/ext/foo/composer.json new file mode 100644 index 0000000000..744f7be625 --- /dev/null +++ b/tests/extension/ext/foo/composer.json @@ -0,0 +1,22 @@ +{ + "name": "foo/example", + "type": "phpbb3-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", + "licence": "GPL-2.0", + "authors": [{ + "name": "Nathan Guse", + "username": "EXreaction", + "email": "email@phpbb.com", + "homepage": "http://lithiumstudios.org", + "role": "N/A" + }], + "require": { + "php": ">=5.3", + "phpbb": "3.1.0-dev" + }, + "extra": { + "display-name": "phpBB Foo Extension" + } +} diff --git a/tests/extension/ext/foo/ext.php b/tests/extension/ext/foo/ext.php new file mode 100644 index 0000000000..60b3ad1f16 --- /dev/null +++ b/tests/extension/ext/foo/ext.php @@ -0,0 +1,13 @@ +<?php + +class phpbb_ext_foo_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/foo/sub/type/alternative.php b/tests/extension/ext/foo/sub/type/alternative.php new file mode 100644 index 0000000000..2ea7353f4b --- /dev/null +++ b/tests/extension/ext/foo/sub/type/alternative.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_foo_sub_type_alternative +{ +} diff --git a/tests/extension/ext/foo/type/alternative.php b/tests/extension/ext/foo/type/alternative.php new file mode 100644 index 0000000000..404b66b965 --- /dev/null +++ b/tests/extension/ext/foo/type/alternative.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_foo_type_alternative +{ +} diff --git a/tests/extension/ext/foo/type/dummy/empty.txt b/tests/extension/ext/foo/type/dummy/empty.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/tests/extension/ext/foo/type/dummy/empty.txt diff --git a/tests/extension/ext/foo/typewrong/error.php b/tests/extension/ext/foo/typewrong/error.php new file mode 100644 index 0000000000..ba22cfae9a --- /dev/null +++ b/tests/extension/ext/foo/typewrong/error.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_foo_typewrong_error +{ +} diff --git a/tests/extension/ext/vendor/moo/composer.json b/tests/extension/ext/vendor/moo/composer.json new file mode 100644 index 0000000000..c91a5e027b --- /dev/null +++ b/tests/extension/ext/vendor/moo/composer.json @@ -0,0 +1,22 @@ +{ + "name": "moo/example", + "type": "phpbb3-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", + "licence": "GNU GPL v2", + "authors": [{ + "name": "Nathan Guse", + "username": "EXreaction", + "email": "email@phpbb.com", + "homepage": "http://lithiumstudios.org", + "role": "N/A" + }], + "require": { + "php": ">=5.3", + "phpbb": "3.1.0-dev" + }, + "extra": { + "display-name": "phpBB Moo Extension" + } +} diff --git a/tests/extension/ext/vendor/moo/ext.php b/tests/extension/ext/vendor/moo/ext.php new file mode 100644 index 0000000000..e0ac1a22cc --- /dev/null +++ b/tests/extension/ext/vendor/moo/ext.php @@ -0,0 +1,13 @@ +<?php + +class phpbb_ext_vendor_moo_ext extends phpbb_extension_base +{ + static public $purged; + + public function purge_step($old_state) + { + self::$purged = true; + + return false; + } +} diff --git a/tests/extension/ext/vendor/moo/feature_class.php b/tests/extension/ext/vendor/moo/feature_class.php new file mode 100644 index 0000000000..c3bcc4451c --- /dev/null +++ b/tests/extension/ext/vendor/moo/feature_class.php @@ -0,0 +1,5 @@ +<?php + +class phpbb_ext_vendor_moo_feature_class +{ +} |