aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api/river.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-11-28 20:41:59 -0500
committercash <cash.costello@gmail.com>2011-11-28 20:41:59 -0500
commit6ca01c470d695c8ae309ea3475899c14cc34dd73 (patch)
tree19f1f30b32f85b991356a113fef0189a2fa8ebc4 /engine/tests/api/river.php
parent6ce419887e7acfa690264a4d11df2c9d66d16099 (diff)
downloadelgg-6ca01c470d695c8ae309ea3475899c14cc34dd73.tar.gz
elgg-6ca01c470d695c8ae309ea3475899c14cc34dd73.tar.bz2
forgot this unit test from a previous commit
Diffstat (limited to 'engine/tests/api/river.php')
-rw-r--r--engine/tests/api/river.php21
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')))");
+ }
+}