aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api/plugins.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 05:28:42 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 05:28:42 +0000
commit5829097649009879edd325b38b978e4061553805 (patch)
tree83eac52ecf9f4c906fa3b7fbb362aad5ea6f35ec /engine/tests/api/plugins.php
parentb1d46a40d6e04fe14ac83e5d761cdb8db8bac7f1 (diff)
downloadelgg-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/api/plugins.php')
-rw-r--r--engine/tests/api/plugins.php16
1 files changed, 16 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.');