aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-18 21:31:21 -0500
committercash <cash.costello@gmail.com>2011-11-28 21:44:00 -0500
commit563b7d5df5928fa4eed3f04ac4c57c82cc9a8f2e (patch)
tree3b1a405af331f45e4f7ca1b9fb3360766c788a44 /engine/tests/api
parentd3f8a31e976c7bc74a65096f63ad188a638e670c (diff)
downloadelgg-563b7d5df5928fa4eed3f04ac4c57c82cc9a8f2e.tar.gz
elgg-563b7d5df5928fa4eed3f04ac4c57c82cc9a8f2e.tar.bz2
Fixes #4134 improved plugin manifest tests by using assertIdentical more
Diffstat (limited to 'engine/tests/api')
-rw-r--r--engine/tests/api/plugins.php46
1 files changed, 23 insertions, 23 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