aboutsummaryrefslogtreecommitdiff
path: root/engine/tests
diff options
context:
space:
mode:
Diffstat (limited to 'engine/tests')
-rw-r--r--engine/tests/api/plugins.php16
-rw-r--r--engine/tests/test_files/plugin_18/manifest.xml6
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>