We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
0000-00-00 00:00:00
1 parent f735e3d commit 2f513bcCopy full SHA for 2f513bc
app/code/Magento/Ui/Test/Unit/Component/Listing/Columns/DateTest.php
@@ -89,4 +89,14 @@ public function testPrepareDataSource()
89
$result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]);
90
$this->assertEquals(self::TEST_TIME, $result['data']['items'][0]['field_name']);
91
}
92
+
93
+ public function testPrepareDataSourceWithZeroDate()
94
+ {
95
+ $zeroDate = '0000-00-00 00:00:00';
96
+ $item = ['test_data' => 'some_data', 'field_name' => $zeroDate];
97
+ $this->timezoneMock->expects($this->never())->method('date');
98
99
+ $result = $this->model->prepareDataSource(['data' => ['items' => [$item]]]);
100
+ $this->assertEquals($zeroDate, $result['data']['items'][0]['field_name']);
101
+ }
102
0 commit comments