private function UiTest::assertAddEnvironmentForPluginFunctionality in Build Hooks 8.2
Same name and namespace in other branches
- 3.x tests/src/Functional/UiTest.php \Drupal\Tests\build_hooks\Functional\UiTest::assertAddEnvironmentForPluginFunctionality()
Assert add links work.
1 call to UiTest::assertAddEnvironmentForPluginFunctionality()
- UiTest::testBuildHooksUi in tests/
src/ Functional/ UiTest.php - Test build hooks UI.
File
- tests/
src/ Functional/ UiTest.php, line 145
Class
- UiTest
- Defines a class for testing build hooks UI.
Namespace
Drupal\Tests\build_hooks\FunctionalCode
private function assertAddEnvironmentForPluginFunctionality() {
$assert = $this
->assertSession();
$query = $assert
->buildXPathQuery('//a[contains(@href, :href)]', [
':href' => Url::fromRoute('build_hooks.admin_add', [
'plugin_id' => 'build_hooks_test',
])
->toString(),
]);
$link = $assert
->elementExists('xpath', $query);
$link
->click();
$assert
->statusCodeEquals(200);
$assert
->pageTextContains('Add new frontend environment');
}