diff options
author | kasimi <mail@kasimi.net> | 2018-03-11 22:13:03 +0100 |
---|---|---|
committer | kasimi <mail@kasimi.net> | 2018-03-11 22:17:26 +0100 |
commit | aa9d24ad3176a2fa0551a65355c05208774eeb6b (patch) | |
tree | bd109c45bd86bfc1a06db667d87249b82c1f8354 /tests/dbal/ext | |
parent | 2d5fe90ed5735c44ae733959c96da3a67a5d2647 (diff) | |
download | forums-aa9d24ad3176a2fa0551a65355c05208774eeb6b.tar forums-aa9d24ad3176a2fa0551a65355c05208774eeb6b.tar.gz forums-aa9d24ad3176a2fa0551a65355c05208774eeb6b.tar.bz2 forums-aa9d24ad3176a2fa0551a65355c05208774eeb6b.tar.xz forums-aa9d24ad3176a2fa0551a65355c05208774eeb6b.zip |
[ticket/15586] Added tests for adding modules the automatic way
PHPBB3-15586
Diffstat (limited to 'tests/dbal/ext')
-rw-r--r-- | tests/dbal/ext/foo/bar/acp/acp_test_info.php | 37 | ||||
-rw-r--r-- | tests/dbal/ext/foo/bar/acp/acp_test_module.php | 25 | ||||
-rw-r--r-- | tests/dbal/ext/foo/bar/composer.json | 24 | ||||
-rw-r--r-- | tests/dbal/ext/foo/bar/ucp/ucp_test_info.php | 37 | ||||
-rw-r--r-- | tests/dbal/ext/foo/bar/ucp/ucp_test_module.php | 25 |
5 files changed, 148 insertions, 0 deletions
diff --git a/tests/dbal/ext/foo/bar/acp/acp_test_info.php b/tests/dbal/ext/foo/bar/acp/acp_test_info.php new file mode 100644 index 0000000000..ac92623c3a --- /dev/null +++ b/tests/dbal/ext/foo/bar/acp/acp_test_info.php @@ -0,0 +1,37 @@ +<?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 foo\bar\acp; + +class acp_test_info +{ + public function module() + { + return array( + 'filename' => '\foo\bar\acp\acp_test_module', + 'title' => 'ACP_NEW_MODULE', + 'modes' => array( + 'mode_1' => array( + 'title' => 'ACP_NEW_MODULE_MODE_1', + 'auth' => '', + 'cat' => array('ACP_NEW_MODULE'), + ), + 'mode_2' => array( + 'title' => 'ACP_NEW_MODULE_MODE_2', + 'auth' => '', + 'cat' => array('ACP_NEW_MODULE'), + ), + ), + ); + } +} diff --git a/tests/dbal/ext/foo/bar/acp/acp_test_module.php b/tests/dbal/ext/foo/bar/acp/acp_test_module.php new file mode 100644 index 0000000000..01ce5c17dc --- /dev/null +++ b/tests/dbal/ext/foo/bar/acp/acp_test_module.php @@ -0,0 +1,25 @@ +<?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 foo\bar\acp; + +class acp_test_module +{ + var $u_action; + + function main($id, $mode) + { + $this->tpl_name = 'foobar'; + $this->page_title = 'Bertie'; + } +} diff --git a/tests/dbal/ext/foo/bar/composer.json b/tests/dbal/ext/foo/bar/composer.json new file mode 100644 index 0000000000..2edfd43d84 --- /dev/null +++ b/tests/dbal/ext/foo/bar/composer.json @@ -0,0 +1,24 @@ +{ + "name": "foo/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": "GNU GPL v2", + "authors": [{ + "name": "John Smith", + "username": "JohnSmith27", + "email": "email@phpbb.com", + "homepage": "http://phpbb.com", + "role": "N/A" + }], + "require": { + "php": ">=5.4.7" + }, + "extra": { + "display-name": "phpBB BarFoo Extension", + "soft-require": { + "phpbb/phpbb": "3.2.*@dev" + } + } +} diff --git a/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php b/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php new file mode 100644 index 0000000000..d3489af832 --- /dev/null +++ b/tests/dbal/ext/foo/bar/ucp/ucp_test_info.php @@ -0,0 +1,37 @@ +<?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 foo\bar\ucp; + +class ucp_test_info +{ + public function module() + { + return array( + 'filename' => '\foo\bar\ucp\ucp_test_module', + 'title' => 'UCP_NEW_MODULE', + 'modes' => array( + 'mode_1' => array( + 'title' => 'UCP_NEW_MODULE_MODE_1', + 'auth' => '', + 'cat' => array('UCP_NEW_MODULE'), + ), + 'mode_2' => array( + 'title' => 'UCP_NEW_MODULE_MODE_2', + 'auth' => '', + 'cat' => array('UCP_NEW_MODULE'), + ), + ), + ); + } +} diff --git a/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php b/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php new file mode 100644 index 0000000000..b06b3238b6 --- /dev/null +++ b/tests/dbal/ext/foo/bar/ucp/ucp_test_module.php @@ -0,0 +1,25 @@ +<?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 foo\bar\ucp; + +class ucp_test_module +{ + var $u_action; + + function main($id, $mode) + { + $this->tpl_name = 'foobar'; + $this->page_title = 'Bertie'; + } +} |