diff options
author | cash <cash.costello@gmail.com> | 2011-11-28 20:41:59 -0500 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-11-28 20:41:59 -0500 |
commit | 6ca01c470d695c8ae309ea3475899c14cc34dd73 (patch) | |
tree | 19f1f30b32f85b991356a113fef0189a2fa8ebc4 /engine/tests | |
parent | 6ce419887e7acfa690264a4d11df2c9d66d16099 (diff) | |
download | elgg-6ca01c470d695c8ae309ea3475899c14cc34dd73.tar.gz elgg-6ca01c470d695c8ae309ea3475899c14cc34dd73.tar.bz2 |
forgot this unit test from a previous commit
Diffstat (limited to 'engine/tests')
-rw-r--r-- | engine/tests/api/river.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engine/tests/api/river.php b/engine/tests/api/river.php new file mode 100644 index 000000000..55ddbfeec --- /dev/null +++ b/engine/tests/api/river.php @@ -0,0 +1,21 @@ +<?php +/** + * Elgg Test river api + * + * @package Elgg + * @subpackage Test + */ +class ElggCoreRiverAPITest extends ElggCoreUnitTest { + + public function testElggTypeSubtypeWhereSQL() { + $types = array('object'); + $subtypes = array('blog'); + $result = elgg_get_river_type_subtype_where_sql('rv', $types, $subtypes, null); + $this->assertIdentical($result, "((rv.type = 'object') AND (rv.subtype = 'blog'))"); + + $types = array('object'); + $subtypes = array('blog', 'file'); + $result = elgg_get_river_type_subtype_where_sql('rv', $types, $subtypes, null); + $this->assertIdentical($result, "((rv.type = 'object') AND ((rv.subtype = 'blog') OR (rv.subtype = 'file')))"); + } +} |