public functionpageTextMatches(string $regex) {
$actual = $this->session
->getPage()
->getText();
$message = sprintf('The pattern %s was not found anywhere in the text of the current page.', $regex);
$this->assertResponseText((bool) preg_match($regex, $actual), $message);
}