diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2013-02-27 10:36:47 -0500 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2013-02-27 10:36:47 -0500 |
commit | 8f7bd6a446c85d8200e384ad320ea2507a850b0e (patch) | |
tree | c0b0ebeb7c323f4123c27da1124f134a3871651f /engine/tests/api | |
parent | 3cefc94d2a2a77402742098adc999e70cfc4b764 (diff) | |
download | elgg-8f7bd6a446c85d8200e384ad320ea2507a850b0e.tar.gz elgg-8f7bd6a446c85d8200e384ad320ea2507a850b0e.tar.bz2 |
Fixes #5066. Empty subtypes are handled the same way for both 'subtype' and 'subtypes'
Diffstat (limited to 'engine/tests/api')
-rw-r--r-- | engine/tests/api/entity_getter_functions.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/engine/tests/api/entity_getter_functions.php b/engine/tests/api/entity_getter_functions.php index 6f7a6145e..52470e19d 100644 --- a/engine/tests/api/entity_getter_functions.php +++ b/engine/tests/api/entity_getter_functions.php @@ -2817,4 +2817,38 @@ class ElggCoreEntityGetterFunctionsTest extends ElggCoreUnitTest { $entities = elgg_get_entities($options); $this->assertFalse($entities); } + + public function testEGEEmptySubtypePlurality() { + $options = array( + 'type' => 'user', + 'subtypes' => '' + ); + + $entities = elgg_get_entities($options); + $this->assertTrue(is_array($entities)); + + $options = array( + 'type' => 'user', + 'subtype' => '' + ); + + $entities = elgg_get_entities($options); + $this->assertTrue(is_array($entities)); + + $options = array( + 'type' => 'user', + 'subtype' => array('') + ); + + $entities = elgg_get_entities($options); + $this->assertTrue(is_array($entities)); + + $options = array( + 'type' => 'user', + 'subtypes' => array('') + ); + + $entities = elgg_get_entities($options); + $this->assertTrue(is_array($entities)); + } } |