@@ -149,6 +149,7 @@ public function testBasePlugin() {
$tables=$query->getTables();
$join_info=$tables['users3'];
$this->assertTrue(strpos($join_info['condition'],"views_test_data.uid = users3.uid")!==FALSE,'Make sure the join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"users3.name = :views_join_condition_0")!==FALSE,'Make sure the first extra join condition appears in the query and uses the first placeholder.');
$this->assertTrue(strpos($join_info['condition'],"users3.name <> :views_join_condition_1")!==FALSE,'Make sure the second extra join condition appears in the query and uses the second placeholder.');
$this->assertEqual(array_values($join_info['arguments']),array($random_name_1,$random_name_2),'Make sure the arguments are in the right order');
...
...
@@ -174,7 +175,37 @@ public function testBasePlugin() {
$tables=$query->getTables();
$join_info=$tables['users4'];
$this->assertTrue(strpos($join_info['condition'],"views_test_data.uid = users4.uid")!==FALSE,'Make sure the join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"users4.name = :views_join_condition_2")!==FALSE,'Make sure the first extra join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"users4.name IN ( :views_join_condition_3, :views_join_condition_4, :views_join_condition_5 )")!==FALSE,'The IN condition for the join is properly formed.');
// Test that all the conditions are properly built.
$this->assertTrue(strpos($join_info['condition'],"views_test_data.uid = users5.uid")!==FALSE,'Make sure the join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"users5.langcode = :views_join_condition_6")!==FALSE,'Make sure the first extra join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"views_test_data.status = :views_join_condition_7")!==FALSE,'Make sure the second extra join condition appears in the query.');
$this->assertTrue(strpos($join_info['condition'],"users5.name = views_test_data.name")!==FALSE,'Make sure the third extra join condition appears in the query.');
$this->assertEqual(array_values($join_info['arguments']),array('en',0),'Make sure the arguments are in the right order');