The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 1d5e0d69 authored by Demian Katz's avatar Demian Katz
Browse files

Add utility method.

parent 1d91a352
Branches
Tags
No related merge requests found
......@@ -258,6 +258,25 @@ abstract class MinkTestCase extends DbTestCase
return $result;
}
/**
* Check whether an element containing the specified text exists.
*
* @param Element $page Page element
* @param string $selector CSS selector
* @param string $text Expected text
*
* @return bool
*/
protected function hasElementsMatchingText(Element $page, $selector, $text)
{
foreach ($page->findAll('css', $selector) as $current) {
if ($text === $current->getText()) {
return true;
}
}
return false;
}
/**
* Standard setup method.
*
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment