mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #56 from halkyon/exception_error
Fixing call to protected method elementNotFound.
This commit is contained in:
commit
fd40300c54
@ -459,7 +459,7 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
|
|||||||
// Find field
|
// Find field
|
||||||
$field = $page->findField($select);
|
$field = $page->findField($select);
|
||||||
if (null === $field) {
|
if (null === $field) {
|
||||||
throw $page->elementNotFound('form field', 'id|name|label|value', $select);
|
throw new ElementNotFoundException($this->getSession(), 'form field', 'id|name|label|value', $select);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find option
|
// Find option
|
||||||
@ -467,7 +467,7 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
|
|||||||
'option', $this->getSession()->getSelectorsHandler()->xpathLiteral($option)
|
'option', $this->getSession()->getSelectorsHandler()->xpathLiteral($option)
|
||||||
));
|
));
|
||||||
if (null === $opt) {
|
if (null === $opt) {
|
||||||
throw $field->elementNotFound('select option', 'value|text', $option);
|
throw new ElementNotFoundException($this->getSession(), 'select option', 'value|text', $option);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge new option in with old handling both multiselect and single select
|
// Merge new option in with old handling both multiselect and single select
|
||||||
|
Loading…
Reference in New Issue
Block a user