File tree Expand file tree Collapse file tree 4 files changed +4
-8
lines changed
lib/internal/Magento/Framework/Stdlib
Test/Unit/DateTime/Filter Expand file tree Collapse file tree 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,7 @@ public function filter($value)
67
67
$ value = new \DateTime ($ value );
68
68
return $ value ->format ('Y-m-d ' );
69
69
} catch (\Exception $ e ) {
70
- throw new LocalizedException (
71
- new Phrase ('Invalid input date format ' )
72
- );
70
+ throw new \Exception ('Invalid input date format ' );
73
71
}
74
72
}
75
73
}
Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ public function filter($value)
45
45
$ value = new \DateTime ($ value );
46
46
return $ value ->format ('Y-m-d H:i:s ' );
47
47
} catch (\Exception $ e ) {
48
- throw new LocalizedException (
49
- new Phrase ('Invalid input date format ' )
50
- );
48
+ throw new \Exception ('Invalid input datetime format ' );
51
49
}
52
50
}
53
51
}
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function dateFilterDataProvider()
49
49
*/
50
50
public function testFilterWithException ($ inputData )
51
51
{
52
- $ this ->setExpectedException ('\Magento\Framework\ Exception\LocalizedException ' );
52
+ $ this ->setExpectedException ('\Exception ' );
53
53
54
54
$ localeMock = $ this ->getMock ('\Magento\Framework\Stdlib\DateTime\TimezoneInterface ' );
55
55
$ localeMock ->expects (
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function dateTimeFilterDataProvider()
50
50
*/
51
51
public function testFilterWithException ($ inputData )
52
52
{
53
- $ this ->setExpectedException ('\Magento\Framework\ Exception\LocalizedException ' );
53
+ $ this ->setExpectedException ('\Exception ' );
54
54
55
55
$ localeMock = $ this ->getMock ('\Magento\Framework\Stdlib\DateTime\TimezoneInterface ' );
56
56
$ localeMock ->expects (
You can’t perform that action at this time.
0 commit comments