public function titleEquals($expected_title) { $title_element =
$this->session->
getPage()->
find('css', 'title'
);
if (!
$title_element) { throw new ExpectationException('No title element found on the page',
$this->session->
getDriver());
} $actual_title =
$title_element->
getText();
$this->
assert($expected_title ===
$actual_title, 'Title found'
);
} /**
* Passes if a link with the specified label is found.
*
* An optional link index may be passed.
*
* @param string $label
* Text between the anchor tags.
* @param int $index
* Link position counting from zero.
* @param string $message
* (optional) A message to display with the assertion. Do not translate
* messages: use strtr() to embed variables in the message text, not
* t(). If left blank, a default message will be displayed.
*
* @throws \Behat\Mink\Exception\ExpectationException
* Thrown when element doesn't exist, or the link label is a different one.
*/