mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-20 07:21:30 +02:00
[ticket/12009] Move valid extensions in tests to correct dir structure.
PHPBB3-12009
This commit is contained in:
18
tests/extension/ext/vendor2/bar/acp/a_info.php
Normal file
18
tests/extension/ext/vendor2/bar/acp/a_info.php
Normal file
@@ -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')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
7
tests/extension/ext/vendor2/bar/acp/a_module.php
Normal file
7
tests/extension/ext/vendor2/bar/acp/a_module.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace vendor2\bar\acp;
|
||||
|
||||
class a_module
|
||||
{
|
||||
}
|
21
tests/extension/ext/vendor2/bar/composer.json
Normal file
21
tests/extension/ext/vendor2/bar/composer.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"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",
|
||||
"licence": "GPL-2.0",
|
||||
"authors": [{
|
||||
"name": "John Smith",
|
||||
"email": "email@phpbb.com",
|
||||
"homepage": "http://phpbb.com",
|
||||
"role": "N/A"
|
||||
}],
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"phpbb/phpbb": "3.1.*@dev"
|
||||
},
|
||||
"extra": {
|
||||
"display-name": "phpBB Bar Extension"
|
||||
}
|
||||
}
|
26
tests/extension/ext/vendor2/bar/ext.php
Normal file
26
tests/extension/ext/vendor2/bar/ext.php
Normal file
@@ -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;
|
||||
}
|
||||
}
|
7
tests/extension/ext/vendor2/foo/a_class.php
Normal file
7
tests/extension/ext/vendor2/foo/a_class.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace vendor2\foo;
|
||||
|
||||
class a_class
|
||||
{
|
||||
}
|
18
tests/extension/ext/vendor2/foo/acp/a_info.php
Normal file
18
tests/extension/ext/vendor2/foo/acp/a_info.php
Normal file
@@ -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' => '', 'cat' => array('ACP_MODS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
7
tests/extension/ext/vendor2/foo/acp/a_module.php
Normal file
7
tests/extension/ext/vendor2/foo/acp/a_module.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace vendor2\foo\acp;
|
||||
|
||||
class a_module
|
||||
{
|
||||
}
|
22
tests/extension/ext/vendor2/foo/acp/fail_info.php
Normal file
22
tests/extension/ext/vendor2/foo/acp/fail_info.php
Normal file
@@ -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')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
11
tests/extension/ext/vendor2/foo/acp/fail_module.php
Normal file
11
tests/extension/ext/vendor2/foo/acp/fail_module.php
Normal file
@@ -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
|
||||
{
|
||||
}
|
7
tests/extension/ext/vendor2/foo/b_class.php
Normal file
7
tests/extension/ext/vendor2/foo/b_class.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace vendor2\foo;
|
||||
|
||||
class b_class
|
||||
{
|
||||
}
|
21
tests/extension/ext/vendor2/foo/composer.json
Normal file
21
tests/extension/ext/vendor2/foo/composer.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"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",
|
||||
"licence": "GPL-2.0",
|
||||
"authors": [{
|
||||
"name": "John Smith",
|
||||
"email": "email@phpbb.com",
|
||||
"homepage": "http://phpbb.com",
|
||||
"role": "N/A"
|
||||
}],
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"phpbb/phpbb": "3.1.*@dev"
|
||||
},
|
||||
"extra": {
|
||||
"display-name": "phpBB Foo Extension"
|
||||
}
|
||||
}
|
15
tests/extension/ext/vendor2/foo/ext.php
Normal file
15
tests/extension/ext/vendor2/foo/ext.php
Normal file
@@ -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;
|
||||
}
|
||||
}
|
18
tests/extension/ext/vendor2/foo/mcp/a_info.php
Normal file
18
tests/extension/ext/vendor2/foo/mcp/a_info.php
Normal file
@@ -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')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
7
tests/extension/ext/vendor2/foo/mcp/a_module.php
Normal file
7
tests/extension/ext/vendor2/foo/mcp/a_module.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace vendor2\foo\mcp;
|
||||
|
||||
class a_module
|
||||
{
|
||||
}
|
7
tests/extension/ext/vendor2/foo/sub/type/alternative.php
Normal file
7
tests/extension/ext/vendor2/foo/sub/type/alternative.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace foo\sub\type;
|
||||
|
||||
class alternative
|
||||
{
|
||||
}
|
7
tests/extension/ext/vendor2/foo/type/alternative.php
Normal file
7
tests/extension/ext/vendor2/foo/type/alternative.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace foo\type;
|
||||
|
||||
class alternative
|
||||
{
|
||||
}
|
7
tests/extension/ext/vendor2/foo/typewrong/error.php
Normal file
7
tests/extension/ext/vendor2/foo/typewrong/error.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace foo\typewrong;
|
||||
|
||||
class error
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user