Issue #1893336 by dawehner: Fixed Views Machine name field does not work.

8.0.x
webchick 2013-01-23 10:12:39 -08:00
parent f26efbe105
commit 2575651a83
2 changed files with 12 additions and 1 deletions

View File

@ -139,4 +139,15 @@ class BasicTest extends WizardTestBase {
$this->assertNoText('tracker', t('Default tracker view does not show on the listing page.'));
}
/**
* Tests the actual wizard form.
*
* @see \Drupal\views_ui\ViewAddFormController::form()
*/
protected function testWizardForm() {
$this->drupalGet('admin/structure/views/add');
$result = $this->xpath('//small[@id = "edit-human-name-machine-name-suffix"]');
$this->assertTrue(count($result), 'Ensure that the machine name is applied to the name field.');
}
}

View File

@ -49,7 +49,7 @@ class ViewAddFormController extends ViewFormControllerBase {
'#maxlength' => 128,
'#machine_name' => array(
'exists' => 'views_get_view',
'source' => array('id', 'human_name'),
'source' => array('name', 'human_name'),
),
'#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),
);