aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api/entity_getter_functions.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-04-16 11:52:37 -0400
commit309dff2bf948ab191ccb1e8d4a777e49ad498820 (patch)
tree813350181be64e239287c0bb587a3a49320a49b7 /engine/tests/api/entity_getter_functions.php
parent119ec1f1425ab77ed29c696d99c0c80df3886791 (diff)
parent2b2afd98c05139c1a5c25f1752e2bb412e26e335 (diff)
downloadelgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.gz
elgg-309dff2bf948ab191ccb1e8d4a777e49ad498820.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'engine/tests/api/entity_getter_functions.php')
-rw-r--r--engine/tests/api/entity_getter_functions.php51
1 files changed, 26 insertions, 25 deletions
diff --git a/engine/tests/api/entity_getter_functions.php b/engine/tests/api/entity_getter_functions.php
index 1633cbe19..aef7a991e 100644
--- a/engine/tests/api/entity_getter_functions.php
+++ b/engine/tests/api/entity_getter_functions.php
@@ -1341,7 +1341,7 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
$e->save();
$guids[] = $e->getGUID();
@@ -1406,11 +1406,13 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
// make some bad ones
$invalid_md_name = 'test_metadata_name_' . rand();
+ $invalid_md_name2 = 'test_metadata_name_' . rand();
+ $invalid_md_name3 = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
- $e->$md_name2 = $invalid_md_value;
- $e->$md_name3 = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
+ $e->$invalid_md_name2 = $md_value2;
+ $e->$invalid_md_name3 = $md_value3;
$e->save();
$guids[] = $e->getGUID();
@@ -1483,10 +1485,11 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
// make some bad ones
$invalid_md_name = 'test_metadata_name_' . rand();
+ $invalid_md_name2 = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
- $e->$md_name2 = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
+ $e->$invalid_md_name2 = $md_value2;
$e->save();
$guids[] = $e->getGUID();
@@ -1572,11 +1575,11 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
- $e->$md_name2 = $invalid_md_value;
- $e->$md_name3 = $invalid_md_value;
- $e->$md_name4 = $invalid_md_value;
- $e->$md_name5 = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
+ $e->$md_name2 = $md_value2;
+ $e->$md_name3 = $md_value3;
+ $e->$md_name4 = $md_value4;
+ $e->$md_name5 = $md_value5;
$e->save();
$guids[] = $e->getGUID();
@@ -1649,7 +1652,7 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
$e->save();
$guids[] = $e->getGUID();
@@ -1694,7 +1697,7 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
$e->save();
$guids[] = $e->getGUID();
@@ -1758,7 +1761,7 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
$e->save();
$guids[] = $e->getGUID();
@@ -1836,7 +1839,7 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$invalid_md_name = 'test_metadata_name_' . rand();
$e = new ElggObject();
$e->subtype = $subtype;
- $e->$md_name = $invalid_md_value;
+ $e->$invalid_md_name = $md_value;
$e->save();
$guids[] = $e->getGUID();
@@ -1888,33 +1891,32 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$subtypes = $this->getRandomValidSubtypes(array('object'), 1);
$subtype = $subtypes[0];
$md_name = 'test_metadata_name_' . rand();
- $md_value = 2;
$guids = array();
$valid_guids = array();
// our targets
$valid = new ElggObject();
$valid->subtype = $subtype;
- $valid->$md_name = $md_value;
+ $valid->$md_name = 1;
$valid->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid->getGUID();
$valid2 = new ElggObject();
$valid2->subtype = $subtype;
- $valid2->$md_name = 3;
+ $valid2->$md_name = 2;
$valid2->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid2->getGUID();
$valid3 = new ElggObject();
$valid3->subtype = $subtype;
- $valid3->$md_name = 1;
+ $valid3->$md_name = 3;
$valid3->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid3->getGUID();
- $md_valid_values = array($md_value, $md_value2);
+ $md_valid_values = array(1, 2, 3);
$options = array(
'type' => 'object',
@@ -1947,33 +1949,32 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest {
$subtypes = $this->getRandomValidSubtypes(array('object'), 1);
$subtype = $subtypes[0];
$md_name = 'test_metadata_name_' . rand();
- $md_value = 'b';
$guids = array();
$valid_guids = array();
// our targets
$valid = new ElggObject();
$valid->subtype = $subtype;
- $valid->$md_name = $md_value;
+ $valid->$md_name = 'a';
$valid->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid->getGUID();
$valid2 = new ElggObject();
$valid2->subtype = $subtype;
- $valid2->$md_name = 'c';
+ $valid2->$md_name = 'b';
$valid2->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid2->getGUID();
$valid3 = new ElggObject();
$valid3->subtype = $subtype;
- $valid3->$md_name = 'a';
+ $valid3->$md_name = 'c';
$valid3->save();
$guids[] = $valid->getGUID();
$valid_guids[] = $valid3->getGUID();
- $md_valid_values = array($md_value, $md_value2);
+ $md_valid_values = array('a', 'b', 'c');
$options = array(
'type' => 'object',