public function BambooTwigTestBase::assertElementContains in Bamboo Twig 8.5
Same name and namespace in other branches
- 8 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementContains()
- 8.2 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementContains()
- 8.3 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementContains()
- 8.4 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::assertElementContains()
Asserts that the element with the given CSS selector is present.
Parameters
string $css_selector: The CSS selector identifying the element to check.
string $html: Expected text.
Throws
Behat\Mink\Exception\ElementHtmlException When the condition is not fulfilled.
See also
\Behat\Mink\WebAssert::elementContains
35 calls to BambooTwigTestBase::assertElementContains()
- BambooTwigConfigTest::testGetConfig in tests/
src/ Functional/ BambooTwigConfigTest.php - @covers Drupal\bamboo_twig_config\TwigExtension\Config::getConfig
- BambooTwigConfigTest::testGetSettings in tests/
src/ Functional/ BambooTwigConfigTest.php - @covers Drupal\bamboo_twig_config\TwigExtension\Config::getSettings
- BambooTwigConfigTest::testGetState in tests/
src/ Functional/ BambooTwigConfigTest.php - @covers Drupal\bamboo_twig_config\TwigExtension\Config::getState
- BambooTwigExtensionsI18nTest::testDateDiffTimeAgoAuto in tests/
src/ Functional/ BambooTwigExtensionsI18nTest.php - Cover the \Twig_Extensions_Extension_Date::diff.
- BambooTwigExtensionsI18nTest::testDateDiffTimeInAuto in tests/
src/ Functional/ BambooTwigExtensionsI18nTest.php - Cover the \Twig_Extensions_Extension_Date::diff.
File
- tests/
src/ Functional/ BambooTwigTestBase.php, line 292
Class
- BambooTwigTestBase
- Has some additional helper methods to make test code more readable.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function assertElementContains($css_selector, $html) {
$this
->assertSession()
->elementContains('css', $css_selector, $html);
}