Skip to content

Commit a484482

Browse files
committed
MAGETWO-35064: At night (by Kiev time) some tests connected to dates are failed
1 parent e69fca4 commit a484482

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

app/code/Magento/Checkout/Test/Unit/Helper/DataTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ protected function setUp()
123123
);
124124

125125
$this->_checkoutSession = $arguments['checkoutSession'];
126-
$localeDate = $arguments['localeDate'];
127-
$localeDate->expects($this->any())->method('date')->will($this->returnValue('Oct 02, 2013'));
126+
$arguments['localeDate']->expects($this->any())
127+
->method('formatDateTime')
128+
->willReturn('Oct 02, 2013');
128129

129130
$this->_transportBuilder = $arguments['transportBuilder'];
130131

app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,13 +252,13 @@ public function testEditPostActionWithAuthenticationExceptionWhenTryingChangePas
252252
$this->customerAccountManagement
253253
->expects($this->once())
254254
->method('changePassword')
255-
->willThrowException(new \Magento\Framework\Exception\AuthenticationException('Error'));
255+
->willThrowException(new \Magento\Framework\Exception\AuthenticationException(__('Error')));
256256
$this->messageManager
257257
->expects($this->once())
258258
->method('addError')
259259
->with('Error');
260260

261-
$exception = new \Magento\Framework\Exception\InputException('Error');
261+
$exception = new \Magento\Framework\Exception\InputException(__('Error'));
262262
$this->customerRepository
263263
->expects($this->once())
264264
->method('save')

lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null)
233233
* @param null $locale
234234
* @param null $timezone
235235
* @param string|null $pattern
236-
* @return mixed
236+
* @return string
237237
*/
238238
public function formatDateTime(
239239
\DateTimeInterface $date,

lib/internal/Magento/Framework/Stdlib/DateTime/TimezoneInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null);
122122
* @param null $locale
123123
* @param null $timezone
124124
* @param string|null $pattern
125-
* @return mixed
125+
* @return string
126126
*/
127127
public function formatDateTime(
128128
\DateTimeInterface $date,

0 commit comments

Comments
 (0)