public function CommentTestBase::commentContactInfoAvailable in Drupal 10
Same name and namespace in other branches
- 8 core/modules/comment/tests/src/Functional/CommentTestBase.php \Drupal\Tests\comment\Functional\CommentTestBase::commentContactInfoAvailable()
- 9 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.
File
- core/
modules/ comment/ tests/ src/ Functional/ CommentTestBase.php, line 347
Class
- CommentTestBase
- Provides setup and helper methods for comment tests.
Namespace
Drupal\Tests\comment\FunctionalCode
public function commentContactInfoAvailable() {
return (bool) preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this
->getSession()
->getPage()
->getContent());
}