From 15c7fb4adbb94218c115bce035e41ec4e89ea2a9 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Tue, 5 Mar 2013 11:08:04 +0800 Subject: [PATCH] MDL-37958 behat: Ignoring spaces when comparing field contents --- lib/tests/behat/behat_forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tests/behat/behat_forms.php b/lib/tests/behat/behat_forms.php index 06513518bc0..c25d27c3f63 100644 --- a/lib/tests/behat/behat_forms.php +++ b/lib/tests/behat/behat_forms.php @@ -154,7 +154,7 @@ class behat_forms extends behat_base { $fieldvalue = $field->get_value(); // Checks if the provided value matches the current field value. - if ($value != $fieldvalue) { + if (trim($value) != trim($fieldvalue)) { throw new ExpectationException( 'The \'' . $locator . '\' value is \'' . $fieldvalue . '\', \'' . $value . '\' expected' , $this->getSession()