From f0b48270d3fcd3a63e32d8bebe6bf79776e016d0 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Wed, 13 May 2015 15:13:51 +0800 Subject: [PATCH] MDL-50179 behat: Use %d for windows compatibility --- calendar/tests/behat/behat_calendar.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/tests/behat/behat_calendar.php b/calendar/tests/behat/behat_calendar.php index 9eded3cc10c..70e57b22730 100644 --- a/calendar/tests/behat/behat_calendar.php +++ b/calendar/tests/behat/behat_calendar.php @@ -106,7 +106,9 @@ class behat_calendar extends behat_base { * @return Given[] */ public function i_hover_over_today_in_the_calendar() { - $todaysday = trim(strftime('%e')); + // For window's compatibility, using %d and not %e. + $todaysday = trim(strftime('%d')); + $todaysday = ltrim($todaysday, '0'); return $this->i_hover_over_day_of_this_month_in_calendar($todaysday); } }