diff --git a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php index 0839fcb..8ea782a 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/JoinTest.php @@ -202,6 +202,26 @@ public function testBasePlugin() { $this->assertTrue(strpos($join_info['condition'], "views_test_data.status = :views_join_condition_5") !== 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']), ['en', 0], 'Make sure the arguments are in the right order'); + + $configuration = [ + 'left_table' => 'views_test_data', + 'left_field' => 'uid', + 'table' => 'users_field_data', + 'field' => 'uid', + 'adjusted' => TRUE, + 'operator' => '<>', + ]; + $join = $this->manager->createInstance('standard', $configuration); + $query = db_select('views_test_data'); + $table = ['alias' => 'users_field_data']; + $join->buildJoin($query, $table, $view->query); + + $tables = $query->getTables(); + $join_info = $tables['users_field_data']; + $this->assertEqual($join_info['join type'], 'LEFT', 'Make sure the default join type is LEFT'); + $this->assertEqual($join_info['table'], $configuration['table']); + $this->assertEqual($join_info['alias'], 'users_field_data'); + $this->assertEqual($join_info['condition'], 'views_test_data.uid <> users_field_data.uid'); } }