function CommentTestBase::commentContactInfoAvailable
Same name in other branches
- 9 core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::commentContactInfoAvailable()
- 8.9.x core/modules/comment/src/Tests/CommentTestBase.php \Drupal\comment\Tests\CommentTestBase::commentContactInfoAvailable()
- 8.9.x core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::commentContactInfoAvailable()
- 10 core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::commentContactInfoAvailable()
Checks whether the commenter's contact information is displayed.
Return value
bool Contact info is available.
1 call to CommentTestBase::commentContactInfoAvailable()
- CommentAnonymousTest::testAnonymous in core/
modules/ comment/ tests/ src/ Functional/ CommentAnonymousTest.php - Tests anonymous comment functionality.
File
-
core/
modules/ comment/ tests/ src/ Functional/ CommentTestBase.php, line 350
Class
- CommentTestBase
- Provides setup and helper methods for comment tests.
Namespace
Drupal\Tests\comment\FunctionalCode
protected function commentContactInfoAvailable() : bool {
return (bool) preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->getSession()
->getPage()
->getContent());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.