mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Fixing call to protected method elementNotFound.
elementNotFound() is protected, it can't be called from outside. Throw an ElementNotFoundException instead.
This commit is contained in:
parent
3fe596be63
commit
223bb9ec22
@ -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