@@ -27,7 +27,8 @@ public function testLoadWithDefault()
2727 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.main ' ));
2828
2929 $ logger = $ container ->getDefinition ('monolog.logger ' );
30- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
30+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
31+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
3132
3233 $ handler = $ container ->getDefinition ('monolog.handler.main ' );
3334 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.stream.class% ' );
@@ -43,7 +44,8 @@ public function testLoadWithCustomValues()
4344 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.custom ' ));
4445
4546 $ logger = $ container ->getDefinition ('monolog.logger ' );
46- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.custom ' )));
47+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
48+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.custom ' )));
4749
4850 $ handler = $ container ->getDefinition ('monolog.handler.custom ' );
4951 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.stream.class% ' );
@@ -62,7 +64,8 @@ public function testLoadWithNestedHandler()
6264
6365 $ logger = $ container ->getDefinition ('monolog.logger ' );
6466 // Nested handler must not be pushed to logger
65- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.custom ' )));
67+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
68+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.custom ' )));
6669
6770 $ handler = $ container ->getDefinition ('monolog.handler.custom ' );
6871 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.stream.class% ' );
@@ -166,7 +169,8 @@ public function testSyslogHandlerWithLogopts()
166169 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.main ' ));
167170
168171 $ logger = $ container ->getDefinition ('monolog.logger ' );
169- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
172+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
173+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
170174
171175 $ handler = $ container ->getDefinition ('monolog.handler.main ' );
172176 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.syslog.class% ' );
@@ -181,7 +185,8 @@ public function testRollbarHandlerCreatesNotifier()
181185 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.main ' ));
182186
183187 $ logger = $ container ->getDefinition ('monolog.logger ' );
184- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
188+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
189+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
185190
186191 $ handler = $ container ->getDefinition ('monolog.handler.main ' );
187192 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.rollbar.class% ' );
@@ -196,7 +201,8 @@ public function testRollbarHandlerReusesNotifier()
196201 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.main ' ));
197202
198203 $ logger = $ container ->getDefinition ('monolog.logger ' );
199- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
204+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
205+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.main ' )));
200206
201207 $ handler = $ container ->getDefinition ('monolog.handler.main ' );
202208 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.rollbar.class% ' );
@@ -220,7 +226,8 @@ public function testSocketHandler()
220226 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.socket ' ));
221227
222228 $ logger = $ container ->getDefinition ('monolog.logger ' );
223- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.socket ' )));
229+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
230+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.socket ' )));
224231
225232 $ handler = $ container ->getDefinition ('monolog.handler.socket ' );
226233 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.socket.class% ' );
@@ -252,7 +259,8 @@ public function testRavenHandlerWhenADSNIsSpecified()
252259 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.raven ' ));
253260
254261 $ logger = $ container ->getDefinition ('monolog.logger ' );
255- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
262+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
263+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
256264
257265 $ this ->assertTrue ($ container ->hasDefinition ('monolog.raven.client. ' .sha1 ($ dsn )));
258266
@@ -269,7 +277,8 @@ public function testRavenHandlerWhenADSNAndAClientAreSpecified()
269277 $ this ->assertFalse ($ container ->hasDefinition ('raven.client ' ));
270278
271279 $ logger = $ container ->getDefinition ('monolog.logger ' );
272- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
280+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
281+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
273282
274283 $ handler = $ container ->getDefinition ('monolog.handler.raven ' );
275284 $ this ->assertDICConstructorArguments ($ handler , array (new Reference ('raven.client ' ), 100 , true ));
@@ -284,7 +293,8 @@ public function testRavenHandlerWhenAClientIsSpecified()
284293 $ this ->assertFalse ($ container ->hasDefinition ('raven.client ' ));
285294
286295 $ logger = $ container ->getDefinition ('monolog.logger ' );
287- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
296+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
297+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.raven ' )));
288298
289299 $ handler = $ container ->getDefinition ('monolog.handler.raven ' );
290300 $ this ->assertDICConstructorArguments ($ handler , array (new Reference ('raven.client ' ), 100 , true ));
@@ -316,7 +326,8 @@ public function testLogglyHandler()
316326 $ this ->assertTrue ($ container ->hasDefinition ('monolog.handler.loggly ' ));
317327
318328 $ logger = $ container ->getDefinition ('monolog.logger ' );
319- $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.loggly ' )));
329+ $ this ->assertDICDefinitionMethodCallAt (0 , $ logger , 'useMicrosecondTimestamps ' , array ('%monolog.use_microseconds% ' ));
330+ $ this ->assertDICDefinitionMethodCallAt (1 , $ logger , 'pushHandler ' , array (new Reference ('monolog.handler.loggly ' )));
320331 $ handler = $ container ->getDefinition ('monolog.handler.loggly ' );
321332 $ this ->assertDICDefinitionClass ($ handler , '%monolog.handler.loggly.class% ' );
322333 $ this ->assertDICConstructorArguments ($ handler , array ($ token , \Monolog \Logger::DEBUG , true ));
0 commit comments