aboutsummaryrefslogtreecommitdiff
path: root/engine/tests/api/river.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-12-08 18:22:45 -0500
committercash <cash.costello@gmail.com>2011-12-08 18:22:45 -0500
commit19a8af878b74dd9e840fb45c1be4c3a61e93cd64 (patch)
tree4ac1f48c196a17e1c5c959911641df564d1f6ef4 /engine/tests/api/river.php
parente99c2870a1ca815c1c94bfec209bda8de4b23a7e (diff)
parentf1c8a2dadee9a31bf941b92eb3f4030b4f89d191 (diff)
downloadelgg-19a8af878b74dd9e840fb45c1be4c3a61e93cd64.tar.gz
elgg-19a8af878b74dd9e840fb45c1be4c3a61e93cd64.tar.bz2
Merging 1.8 into master. This syncs the branches to recover from the cherry picking
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..6931b9f41
--- /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')))");
+ }
+}