protected function DisplayPathTest::doAdvancedPathsValidationTest in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views_ui/tests/src/Functional/DisplayPathTest.php \Drupal\Tests\views_ui\Functional\DisplayPathTest::doAdvancedPathsValidationTest()
Tests a couple of invalid path patterns.
1 call to DisplayPathTest::doAdvancedPathsValidationTest()
- DisplayPathTest::testPathUI in core/
modules/ views_ui/ tests/ src/ Functional/ DisplayPathTest.php - Runs the tests.
File
- core/
modules/ views_ui/ tests/ src/ Functional/ DisplayPathTest.php, line 101
Class
- DisplayPathTest
- Tests the UI of generic display path plugin.
Namespace
Drupal\Tests\views_ui\FunctionalCode
protected function doAdvancedPathsValidationTest() {
$url = 'admin/structure/views/nojs/display/test_view/page_1/path';
$this
->drupalPostForm($url, [
'path' => '%/magrathea',
], t('Apply'));
$this
->assertUrl($url);
$this
->assertText('"%" may not be used for the first segment of a path.');
$this
->drupalPostForm($url, [
'path' => 'user/%1/example',
], t('Apply'));
$this
->assertUrl($url);
$this
->assertText("Numeric placeholders may not be used. Please use plain placeholders (%).");
}