diff options
Diffstat (limited to 'engine/tests')
-rw-r--r-- | engine/tests/api/plugins.php | 46 | ||||
-rw-r--r-- | engine/tests/test_files/plugin_18/manifest.xml | 4 |
2 files changed, 25 insertions, 25 deletions
diff --git a/engine/tests/api/plugins.php b/engine/tests/api/plugins.php index ac38f34ea..8ecb0a46c 100644 --- a/engine/tests/api/plugins.php +++ b/engine/tests/api/plugins.php @@ -93,23 +93,23 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { ), 'conflicts' => array( - array('type' => 'plugin', 'name' => 'profile_api', 'version' => 1.0) + array('type' => 'plugin', 'name' => 'profile_api', 'version' => '1.0') ), 'provides' => array( - array('type' => 'plugin', 'name' => 'profile_api', 'version' => 1.3), - array('type' => 'php_extension', 'name' => 'big_math', 'version' => 1.0) + array('type' => 'plugin', 'name' => 'profile_api', 'version' => '1.3'), + array('type' => 'php_extension', 'name' => 'big_math', 'version' => '1.0') ), 'suggests' => array( - array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => 1.0), + array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => '1.0'), ), // string because we are reading from a file 'activate_on_install' => 'true', ); - $this->assertEqual($this->manifest18->getManifest(), $manifest_array); + $this->assertIdentical($this->manifest18->getManifest(), $manifest_array); } public function testElggPluginManifest17() { @@ -124,7 +124,7 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'name' => 'Plugin Test 17', ); - $this->assertEqual($this->manifest17->getManifest(), $manifest_array); + $this->assertIdentical($this->manifest17->getManifest(), $manifest_array); } @@ -181,7 +181,7 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'elgg_version', 'version' => '3009030802', 'comparison' => 'lt'), array('type' => 'elgg_release', 'version' => '1.8-svn', 'comparison' => 'ge'), array('type' => 'php_extension', 'name' => 'gd', 'version' => '', 'comparison' => '='), - array('type' => 'php_ini', 'name' => 'short_open_tag', 'value' => 'off', 'comparison' => '='), + array('type' => 'php_ini', 'name' => 'short_open_tag', 'value' => 0, 'comparison' => '='), array('type' => 'php_extension', 'name' => 'made_up', 'version' => '1.0', 'comparison' => '='), array('type' => 'plugin', 'name' => 'fake_plugin', 'version' => '1.0', 'comparison' => 'ge'), array('type' => 'plugin', 'name' => 'profile', 'version' => '1.0', 'comparison' => 'ge'), @@ -189,13 +189,13 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'priority', 'priority' => 'after', 'plugin' => 'profile'), ); - $this->assertEqual($this->package18->getManifest()->getRequires(), $requires); + $this->assertIdentical($this->package18->getManifest()->getRequires(), $requires); $requires = array( array('type' => 'elgg_version', 'version' => '2009030702', 'comparison' => 'ge') ); - $this->assertEqual($this->package17->getManifest()->getRequires(), $requires); + $this->assertIdentical($this->package17->getManifest()->getRequires(), $requires); } public function testElggPluginManifestGetSuggests() { @@ -203,11 +203,11 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('type' => 'plugin', 'name' => 'facebook_connect', 'version' => '1.0', 'comparison' => 'ge'), ); - $this->assertEqual($this->package18->getManifest()->getSuggests(), $suggests); + $this->assertIdentical($this->package18->getManifest()->getSuggests(), $suggests); $suggests = array(); - $this->assertEqual($this->package17->getManifest()->getSuggests(), $suggests); + $this->assertIdentical($this->package17->getManifest()->getSuggests(), $suggests); } public function testElggPluginManifestGetDescription() { @@ -220,8 +220,8 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { 'Admin', 'ServiceAPI' ); - $this->assertEqual($this->package18->getManifest()->getCategories(), $categories); - $this->assertEqual($this->package17->getManifest()->getCategories(), array()); + $this->assertIdentical($this->package18->getManifest()->getCategories(), $categories); + $this->assertIdentical($this->package17->getManifest()->getCategories(), array()); } public function testElggPluginManifestGetScreenshots() { @@ -230,25 +230,25 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { array('description' => 'Fun things to do 2', 'path' => 'graphics/plugin_ss2.png'), ); - $this->assertEqual($this->package18->getManifest()->getScreenshots(), $screenshots); - $this->assertEqual($this->package17->getManifest()->getScreenshots(), array()); + $this->assertIdentical($this->package18->getManifest()->getScreenshots(), $screenshots); + $this->assertIdentical($this->package17->getManifest()->getScreenshots(), array()); } public function testElggPluginManifestGetProvides() { $provides = array( - array('type' => 'plugin', 'name' => 'profile_api', 'version' => 1.3), - array('type' => 'php_extension', 'name' => 'big_math', 'version' => 1.0), - array('type' => 'plugin', 'name' => 'plugin_18', 'version' => 1.0) + array('type' => 'plugin', 'name' => 'profile_api', 'version' => '1.3'), + array('type' => 'php_extension', 'name' => 'big_math', 'version' => '1.0'), + array('type' => 'plugin', 'name' => 'plugin_18', 'version' => '1.0') ); - $this->assertEqual($this->package18->getManifest()->getProvides(), $provides); + $this->assertIdentical($this->package18->getManifest()->getProvides(), $provides); $provides = array( array('type' => 'plugin', 'name' => 'plugin_17', 'version' => '1.0') ); - $this->assertEqual($this->package17->getManifest()->getProvides(), $provides); + $this->assertIdentical($this->package17->getManifest()->getProvides(), $provides); } public function testElggPluginManifestGetConflicts() { @@ -261,12 +261,12 @@ class ElggCorePluginsAPITest extends ElggCoreUnitTest { ) ); - $this->assertEqual($this->manifest18->getConflicts(), $conflicts); - $this->assertEqual($this->manifest17->getConflicts(), array()); + $this->assertIdentical($this->manifest18->getConflicts(), $conflicts); + $this->assertIdentical($this->manifest17->getConflicts(), array()); } public function testElggPluginManifestGetActivateOnInstall() { - $this->assertEqual($this->manifest18->getActivateOnInstall(), true); + $this->assertIdentical($this->manifest18->getActivateOnInstall(), true); } // ElggPluginPackage diff --git a/engine/tests/test_files/plugin_18/manifest.xml b/engine/tests/test_files/plugin_18/manifest.xml index e0776ffc1..9654b6422 100644 --- a/engine/tests/test_files/plugin_18/manifest.xml +++ b/engine/tests/test_files/plugin_18/manifest.xml @@ -34,8 +34,6 @@ <category>ServiceAPI</category> - <activate_on_install>true</activate_on_install> - <requires> <type>php_extension</type> <name>gd</name> @@ -102,4 +100,6 @@ <version>1.0</version> </suggests> + <activate_on_install>true</activate_on_install> + </plugin_manifest> |