Tests the language argument.
public function testArgument() {
$view = views_get_view('test_view');
foreach (array(
'en' => 'John',
'xx-lolspeak' => 'George',
) as $langcode => $name) {
$view
->setDisplay();
$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();
}
}