diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-02 23:00:23 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-02 23:00:23 +0000 |
commit | fc21edb0785f2cac11dc592278fad97fffeeb082 (patch) | |
tree | 24047873840c5931766abaa5b15a73c0692e7565 /engine/tests/api/plugins.php | |
parent | a826bea54e8934c19b2ada619d966cc7d9628b42 (diff) | |
download | elgg-fc21edb0785f2cac11dc592278fad97fffeeb082.tar.gz elgg-fc21edb0785f2cac11dc592278fad97fffeeb082.tar.bz2 |
Fixes #1986, #2170, #2225, #2759. Integrated ElggPluginPackage and ElggPluginManifest with ElggPlugin. System now uses ElggPlugin objects to determin plugins. Order is stored in private settings. This absolutely requires running upgrade.php.
git-svn-id: http://code.elgg.org/elgg/trunk@7817 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests/api/plugins.php')
-rw-r--r-- | engine/tests/api/plugins.php | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index c99609559..997d69fb7 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -100,11 +100,10 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'php_extension', 'name' => 'big_math', 'version' => 1.0) ), - 'admin' => array( - 'on_enable' => 'setup_function', - 'on_disable' => 'teardown_function', - 'interface_type' => 'simple' - ) + 'on_activate' => array('setup_function'), + 'on_deactivate' => array('teardown_function'), + 'admin_interface' => 'simple', + 'activate_on_install' => true ); $this->assertEqual($this->manifest18->getManifest(), $manifest_array); @@ -118,7 +117,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'website' => 'http://www.elgg.org/', 'copyright' => '(C) Elgg 2010', 'license' => 'GNU Public License version 2', - 'elgg_version' => '2009030702' + 'elgg_version' => '2009030702', + 'name' => 'Plugin Test 17', ); $this->assertEqual($this->manifest17->getManifest(), $manifest_array); @@ -261,6 +261,22 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { $this->assertEqual($this->manifest17->getConflicts(), array()); } + public function testElggPluginManifestGetOnActivate() { + $this->assertEqual($this->manifest18->getOnActivate(), array('setup_function')); + } + + public function testElggPluginManifestGetOnDeactivate() { + $this->assertEqual($this->manifest18->getOnDeactivate(), array('teardown_function')); + } + + public function testElggPluginManifestGetAdminInterface() { + $this->assertEqual($this->manifest18->getAdminInterface(), 'simple'); + } + + public function testElggPluginManifestGetActivateOnInstall() { + $this->assertEqual($this->manifest18->getActivateOnInstall(), true); + } + // ElggPluginPackage public function testElggPluginPackageDetectIDFromPath() { $this->assertEqual($this->package18->getID(), 'plugin_18'); |