From 5829097649009879edd325b38b978e4061553805 Mon Sep 17 00:00:00 2001 From: brettp Date: Tue, 8 Feb 2011 05:28:42 +0000 Subject: 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 --- engine/tests/api/plugins.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'engine/tests/api') 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.'); -- cgit v1.2.3