mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-28 10:40:28 +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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user