File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -851,8 +851,10 @@ class Utility
851851 "Input must be a valid date/time string: $ e "
852852 );
853853 }
854+
855+ $ factory = \NDB_Factory::singleton ();
854856 return $ dt ->format (
855- \NDB_Config:: singleton ()->getSetting ('dateDisplayFormat ' )
857+ $ factory -> config ()->getSetting ('dateDisplayFormat ' )
856858 ?? DateTime::ATOM
857859 );
858860 }
Original file line number Diff line number Diff line change @@ -1136,6 +1136,13 @@ public function testRandomString()
11361136 public function testToDateDisplayFormat ()
11371137 {
11381138 $ this ->_setMockDB ();
1139+
1140+ $ config = $ this ->getMockBuilder ("\NDB_Config " )->getMock ();
1141+ $ config ->expects ($ this ->any ())
1142+ ->method ('getSetting ' )
1143+ ->willReturn ('Y-m-d H:i:s ' );
1144+ $ this ->_mockFactory ->setConfig ($ config );
1145+
11391146 $ date = "2000-01-01 " ;
11401147 $ this ->assertEquals (
11411148 "2000-01-01 00:00:00 " ,
You can’t perform that action at this time.
0 commit comments