public function ArgumentLanguage::testFilter in Views (for Drupal 7) 8.3
File
- lib/
Drupal/ views/ Tests/ Language/ ArgumentLanguage.php, line 27 - Definition of Drupal\views\Tests\Language\ArgumentLanguage.
Class
- ArgumentLanguage
- Tests the argument language handler.
Namespace
Drupal\views\Tests\LanguageCode
public function testFilter() {
foreach (array(
'en' => 'John',
'xx-lolspeak' => 'George',
) as $langcode => $name) {
$view = $this
->getView();
$view->displayHandlers['default']
->overrideOption('arguments', array(
'langcode' => array(
'id' => 'langcode',
'table' => 'views_test_data',
'field' => 'langcode',
),
));
$this
->executeView($view, array(
$langcode,
));
$expected = array(
array(
'name' => $name,
),
);
$this
->assertIdenticalResultset($view, $expected, array(
'views_test_data_name' => 'name',
));
$view
->destroy();
}
}