mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 04:34:07 +02:00
Merge branch '3.3.x'
This commit is contained in:
23
tests/extension/ext/vendor5/foo/composer.json
Normal file
23
tests/extension/ext/vendor5/foo/composer.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "vendor5/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 Bar Extension",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": "3.3.*@dev"
|
||||
}
|
||||
}
|
||||
}
|
19
tests/extension/ext/vendor5/foo/ext.php
Normal file
19
tests/extension/ext/vendor5/foo/ext.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace vendor5\foo;
|
||||
|
||||
class ext extends \phpbb\extension\base
|
||||
{
|
||||
static public $enabled;
|
||||
|
||||
public function is_enableable()
|
||||
{
|
||||
return array('Reason 1', 'Reason 2');
|
||||
}
|
||||
|
||||
public function enable_step($old_state)
|
||||
{
|
||||
self::$enabled = true;
|
||||
return self::$enabled;
|
||||
}
|
||||
}
|
@@ -36,7 +36,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
||||
public function test_all_available()
|
||||
{
|
||||
// barfoo and vendor3/bar should not listed due to missing composer.json. barfoo also has incorrect dir structure.
|
||||
$this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo', 'vendor3/foo', 'vendor4/bar'), array_keys($this->extension_manager->all_available()));
|
||||
$this->assertEquals(array('vendor/moo', 'vendor2/bar', 'vendor2/foo', 'vendor3/foo', 'vendor4/bar', 'vendor5/foo'), array_keys($this->extension_manager->all_available()));
|
||||
}
|
||||
|
||||
public function test_all_enabled()
|
||||
|
Reference in New Issue
Block a user