aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-10-14 01:30:50 +0200
committerNils Adermann <naderman@naderman.de>2011-10-14 01:30:50 +0200
commit4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a (patch)
tree3620bccb7d14092a77a6517f30cc91809aeae4bb /tests
parentf53892c838dfa3638a47b60b394a948db4873466 (diff)
downloadforums-4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a.tar
forums-4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a.tar.gz
forums-4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a.tar.bz2
forums-4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a.tar.xz
forums-4fb9f2101de8de8dc08ef0a1c44f81c5443f3d7a.zip
[feature/extension-manager] Support extensions in subdirectories of ext/
PHPBB3-10323
Diffstat (limited to 'tests')
-rw-r--r--tests/extension/ext/moo/feature_class.php5
-rw-r--r--tests/extension/ext/vendor/moo/ext.php (renamed from tests/extension/ext/moo/ext.php)2
-rw-r--r--tests/extension/ext/vendor/moo/feature_class.php5
-rw-r--r--tests/extension/fixtures/extensions.xml2
-rw-r--r--tests/extension/manager_test.php18
5 files changed, 16 insertions, 16 deletions
diff --git a/tests/extension/ext/moo/feature_class.php b/tests/extension/ext/moo/feature_class.php
deleted file mode 100644
index bf7ba40d84..0000000000
--- a/tests/extension/ext/moo/feature_class.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-
-class phpbb_ext_moo_feature_class
-{
-}
diff --git a/tests/extension/ext/moo/ext.php b/tests/extension/ext/vendor/moo/ext.php
index 8b534380f2..e0ac1a22cc 100644
--- a/tests/extension/ext/moo/ext.php
+++ b/tests/extension/ext/vendor/moo/ext.php
@@ -1,6 +1,6 @@
<?php
-class phpbb_ext_moo_ext extends phpbb_extension_base
+class phpbb_ext_vendor_moo_ext extends phpbb_extension_base
{
static public $purged;
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
+{
+}
diff --git a/tests/extension/fixtures/extensions.xml b/tests/extension/fixtures/extensions.xml
index f3acdd2575..65cb71c7a4 100644
--- a/tests/extension/fixtures/extensions.xml
+++ b/tests/extension/fixtures/extensions.xml
@@ -8,7 +8,7 @@
<value>1</value>
</row>
<row>
- <value>moo</value>
+ <value>vendor/moo</value>
<value>0</value>
</row>
</table>
diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php
index 4c49366d20..ba7f227a56 100644
--- a/tests/extension/manager_test.php
+++ b/tests/extension/manager_test.php
@@ -9,7 +9,7 @@
require_once dirname(__FILE__) . '/../mock/cache.php';
require_once dirname(__FILE__) . '/ext/bar/ext.php';
-require_once dirname(__FILE__) . '/ext/moo/ext.php';
+require_once dirname(__FILE__) . '/ext/vendor/moo/ext.php';
class phpbb_extension_manager_test extends phpbb_database_test_case
{
@@ -36,7 +36,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
public function test_available()
{
- $this->assertEquals(array('bar', 'foo', 'moo'), array_keys($this->extension_manager->all_available()));
+ $this->assertEquals(array('bar', 'foo', 'vendor/moo'), array_keys($this->extension_manager->all_available()));
}
public function test_enabled()
@@ -46,7 +46,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
public function test_configured()
{
- $this->assertEquals(array('foo', 'moo'), array_keys($this->extension_manager->all_configured()));
+ $this->assertEquals(array('foo', 'vendor/moo'), array_keys($this->extension_manager->all_configured()));
}
public function test_enable()
@@ -56,7 +56,7 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$this->assertEquals(array('foo'), array_keys($this->extension_manager->all_enabled()));
$this->extension_manager->enable('bar');
$this->assertEquals(array('bar', 'foo'), array_keys($this->extension_manager->all_enabled()));
- $this->assertEquals(array('bar', 'foo', 'moo'), array_keys($this->extension_manager->all_configured()));
+ $this->assertEquals(array('bar', 'foo', 'vendor/moo'), array_keys($this->extension_manager->all_configured()));
$this->assertEquals(4, phpbb_ext_bar_ext::$state);
}
@@ -66,20 +66,20 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
$this->assertEquals(array('foo'), array_keys($this->extension_manager->all_enabled()));
$this->extension_manager->disable('foo');
$this->assertEquals(array(), array_keys($this->extension_manager->all_enabled()));
- $this->assertEquals(array('foo', 'moo'), array_keys($this->extension_manager->all_configured()));
+ $this->assertEquals(array('foo', 'vendor/moo'), array_keys($this->extension_manager->all_configured()));
}
public function test_purge()
{
- phpbb_ext_moo_ext::$purged = false;
+ phpbb_ext_vendor_moo_ext::$purged = false;
$this->assertEquals(array('foo'), array_keys($this->extension_manager->all_enabled()));
- $this->assertEquals(array('foo', 'moo'), array_keys($this->extension_manager->all_configured()));
- $this->extension_manager->purge('moo');
+ $this->assertEquals(array('foo', 'vendor/moo'), array_keys($this->extension_manager->all_configured()));
+ $this->extension_manager->purge('vendor/moo');
$this->assertEquals(array('foo'), array_keys($this->extension_manager->all_enabled()));
$this->assertEquals(array('foo'), array_keys($this->extension_manager->all_configured()));
- $this->assertTrue(phpbb_ext_moo_ext::$purged);
+ $this->assertTrue(phpbb_ext_vendor_moo_ext::$purged);
}
public function test_enabled_no_cache()