mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-45284 behat: Replace wrongly triggered not found exception
This commit is contained in:
parent
eabcd76d4d
commit
32aea6a84f
1 changed files with 7 additions and 2 deletions
|
@ -54,10 +54,15 @@ class behat_field_manager {
|
||||||
try {
|
try {
|
||||||
// The DOM node.
|
// The DOM node.
|
||||||
$fieldnode = $context->find_field($label);
|
$fieldnode = $context->find_field($label);
|
||||||
} catch (ElementNotFoundException $e) {
|
} catch (ElementNotFoundException $fieldexception) {
|
||||||
|
|
||||||
// Looking for labels that points to filemanagers.
|
// Looking for labels that points to filemanagers.
|
||||||
|
try {
|
||||||
$fieldnode = $context->find_filemanager($label);
|
$fieldnode = $context->find_filemanager($label);
|
||||||
|
} catch (ElementNotFoundException $filemanagerexception) {
|
||||||
|
// We want the generic 'field' exception.
|
||||||
|
throw $fieldexception;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The behat field manager.
|
// The behat field manager.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue