$this->
drupalGet('admin/config/regional/content-language'
);
$this->
submitForm($edit, 'Save configuration'
);
// Add a node in English, with title "sandwich".
$values =
[ 'title' => 'sandwich',
'type' =>
$type->
id(),
];
$node =
$this->
drupalCreateNode($values);
// "Translate" this node into Spanish, with title "pizza".
$node->
addTranslation('es',
['title' => 'pizza', 'status' => NodeInterface::PUBLISHED
]);
$node->
save();
// Run cron so that the search index tables are updated.
$this->
cronRun();
// Test the keyword filter by visiting the page.
// The views are in the test view 'test_search', and they just display the
// titles of the nodes in the result, as links.
// Page with a keyword filter of 'pizza'. This should find the Spanish
// translated node, which has 'pizza' in the title, but not the English