Skip to content

Commit

Permalink
MAGETWO-57835: [Github] Cannot save customer dob attribute if admin i…
Browse files Browse the repository at this point in the history
…nterface locale is en_GB #6323
  • Loading branch information
slopukhov committed Jul 3, 2017
1 parent a2bec20 commit 6a53f65
Showing 1 changed file with 31 additions and 2 deletions.
Expand Up @@ -118,11 +118,11 @@ public function testPrepare($name, $filterData, $expectedCondition)
$uiComponent->method('convertDate')
->willReturnMap([
[
$filterData[$name]['from'], 0, 0, 0,
$filterData[$name]['from'],
new \DateTime($filterData[$name]['from'], new \DateTimeZone('UTC'))
],
[
$filterData[$name]['to'], 23, 59, 59,
$filterData[$name]['to'],
new \DateTime($filterData[$name]['to'] . ' 23:59:00', new \DateTimeZone('UTC'))
],
]);
Expand Down Expand Up @@ -161,6 +161,35 @@ public function testPrepare($name, $filterData, $expectedCondition)
->with($filterMock);
break;
}
} else {
$uiComponent->method('convertDate')
->willReturnMap([
[
$filterData[$name]['from'],
new \DateTime($filterData[$name]['from'], new \DateTimeZone('UTC'))
],
[
$filterData[$name]['to'],
new \DateTime($filterData[$name]['to'] . ' 23:59:00', new \DateTimeZone('UTC'))
],
]);
$this->filterBuilderMock->expects(static::exactly(2))
->method('setConditionType')
->willReturnSelf();
$this->filterBuilderMock->expects(static::exactly(2))
->method('setField')
->willReturnSelf();
$this->filterBuilderMock->expects(static::exactly(2))
->method('setValue')
->willReturnSelf();

$filterMock = $this->getMock(Filter::class);
$this->filterBuilderMock->expects(static::exactly(2))
->method('create')
->willReturn($filterMock);
$this->dataProviderMock->expects(static::exactly(2))
->method('addFilter')
->with($filterMock);
}

$this->uiComponentFactory->expects($this->any())
Expand Down

0 comments on commit 6a53f65

Please sign in to comment.