mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Behat: More verbose error message in HTML field assertion
This commit is contained in:
parent
fde6b65769
commit
8de227554e
@ -101,10 +101,11 @@ class CmsFormsContext extends BehatContext
|
||||
$regex = '/'.preg_quote($html, '/').'/ui';
|
||||
if (!preg_match($regex, $actual)) {
|
||||
$message = sprintf(
|
||||
'The string "%s" was not found in the HTML of the element matching %s "%s".',
|
||||
'The string "%s" was not found in the HTML of the element matching %s "%s". Actual content: "%s"',
|
||||
$html,
|
||||
'named',
|
||||
$locator
|
||||
$locator,
|
||||
$actual
|
||||
);
|
||||
throw new ElementHtmlException($message, $this->getSession(), $element);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user