public function PathNodeFormTest::testNodeForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/path/src/Tests/PathNodeFormTest.php \Drupal\path\Tests\PathNodeFormTest::testNodeForm()
Tests the node form ui.
File
- core/
modules/ path/ src/ Tests/ PathNodeFormTest.php, line 35 - Contains \Drupal\path\Tests\PathNodeFormTest.
Class
- PathNodeFormTest
- Tests the Path Node form UI.
Namespace
Drupal\path\TestsCode
public function testNodeForm() {
$this
->drupalGet('node/add/page');
// Make sure we have a Path fieldset and Path fields.
$this
->assertRaw(' id="edit-path-settings"', 'Path settings details exists');
$this
->assertFieldByName('path[0][alias]', NULL, 'Path alias field exists');
// Disable the Path field for this content type.
entity_get_form_display('node', 'page', 'default')
->removeComponent('path')
->save();
$this
->drupalGet('node/add/page');
// See if the whole fieldset is gone now.
$this
->assertNoRaw(' id="edit-path-settings"', 'Path settings details does not exist');
$this
->assertNoFieldByName('path[0][alias]', NULL, 'Path alias field does not exist');
}