Commit ade006b7 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1714408: Fix whitespace error in date format"

parents e87eac74 f1182d0b
......@@ -1433,14 +1433,12 @@ JS;
/**
* Takes a date in a format strtotime() can take and looks for it
* in the specified css element. The default format searched for is
* dd Month YYYY, hh:mm AM/PM. You can pass another format as a string
* in the specified css element. You can pass a date format as a string
* defined in langconfig.php or directly as a php date() format.
*
* @Then I should see the date :date in the :element element
* @Then I should see the date :date in the :element element with the format :format
*/
public function i_should_see_date($date, $element, $format = 'strftimedatetime') {
public function i_should_see_date($date, $element, $format = null) {
if (string_exists($format, 'langconfig')) {
$date = format_date(strtotime($date), $format);
}
......
......@@ -34,4 +34,4 @@ Scenario: Adding collection to group (Bug 1448807)
And I choose "Groups" from main menu
And I follow "group 01"
# the formats "strftimedate" and "j F Y" both resolve to dd Month YYYY, which is wanted here.
And I should see the date "today" in the "#sharedcollectionlist" element with the format "strftimedate"
And I should see the date "today" in the "#sharedcollectionlist" element with the format "d F Y"
Markdown is supported
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