diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 05:28:42 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-08 05:28:42 +0000 |
commit | 5829097649009879edd325b38b978e4061553805 (patch) | |
tree | 83eac52ecf9f4c906fa3b7fbb362aad5ea6f35ec /engine/tests | |
parent | b1d46a40d6e04fe14ac83e5d761cdb8db8bac7f1 (diff) | |
download | elgg-5829097649009879edd325b38b978e4061553805.tar.gz elgg-5829097649009879edd325b38b978e4061553805.tar.bz2 |
Added suggests to the plugins deps system. It parallels the requires system, but doesn't affect if the plugin can be enabled and only shows up in the deps table on the advanced view.
git-svn-id: http://code.elgg.org/elgg/trunk@8070 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/tests')
-rw-r--r-- | engine/tests/api/plugins.php | 16 | ||||
-rw-r--r-- | engine/tests/test_files/plugin_18/manifest.xml | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index ac1278410..853af45e9 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -101,6 +101,10 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'php_extension', 'name' => 'big_math', 'version' => 1.0) ), + 'suggests' => array( + array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => 1.0), + ), + 'on_activate' => array('setup_function'), 'on_deactivate' => array('teardown_function'), 'admin_interface' => 'simple', @@ -196,6 +200,18 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { $this->assertEqual($this->package17->getManifest()->getRequires(), $requires); } + public function testElggPluginManifestGetSuggests() { + $suggests = array( + array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => '1.0', 'comparison' => 'ge'), + ); + + $this->assertEqual($this->package18->getManifest()->getSuggests(), $suggests); + + $suggests = array(); + + $this->assertEqual($this->package17->getManifest()->getSuggests(), $suggests); + } + public function testElggPluginManifestGetDescription() { $this->assertEqual($this->package18->getManifest()->getDescription(), 'A longer, more interesting description.'); $this->assertEqual($this->package17->getManifest()->getDescription(), 'A 1.7-style manifest.'); diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml index 2a4d72c65..76837977d 100644 --- a/engine/tests/test_files/plugin_18/manifest.xml +++ b/engine/tests/test_files/plugin_18/manifest.xml @@ -99,4 +99,10 @@ <version>1.0</version> </provides> + <suggests> + <type>plugin</type> + <name>facebook_connect</name> + <version>1.0</version> + </suggests> + </plugin_manifest> |