@@ -240,7 +240,7 @@ function testWatcherReferenceInfo($type, $args)
240
240
241
241
// being referenced is the default
242
242
$ watcherId1 = \call_user_func_array ($ func , $ args );
243
- $ info = $ loop ->info ();
243
+ $ info = $ loop ->getInfo ();
244
244
$ expected = ["enabled " => 1 , "disabled " => 0 ];
245
245
$ this ->assertSame ($ expected , $ info [$ type ]);
246
246
$ expected = ["referenced " => 1 , "unreferenced " => 0 ];
@@ -251,7 +251,7 @@ function testWatcherReferenceInfo($type, $args)
251
251
$ watcherId2 = \call_user_func_array ($ func , $ argsCopy );
252
252
$ loop ->reference ($ watcherId2 );
253
253
$ loop ->reference ($ watcherId2 );
254
- $ info = $ loop ->info ();
254
+ $ info = $ loop ->getInfo ();
255
255
$ expected = ["enabled " => 2 , "disabled " => 0 ];
256
256
$ this ->assertSame ($ expected , $ info [$ type ]);
257
257
$ expected = ["referenced " => 2 , "unreferenced " => 0 ];
@@ -261,27 +261,27 @@ function testWatcherReferenceInfo($type, $args)
261
261
$ loop ->disable ($ watcherId2 );
262
262
$ loop ->disable ($ watcherId2 );
263
263
$ loop ->disable ($ watcherId2 );
264
- $ info = $ loop ->info ();
264
+ $ info = $ loop ->getInfo ();
265
265
$ expected = ["referenced " => 1 , "unreferenced " => 0 ];
266
266
$ this ->assertSame ($ expected , $ info ["watchers " ]);
267
267
268
268
// enabling a referenced watcher should increment the referenced count
269
269
$ loop ->enable ($ watcherId2 );
270
270
$ loop ->enable ($ watcherId2 );
271
- $ info = $ loop ->info ();
271
+ $ info = $ loop ->getInfo ();
272
272
$ expected = ["referenced " => 2 , "unreferenced " => 0 ];
273
273
$ this ->assertSame ($ expected , $ info ["watchers " ]);
274
274
275
275
// cancelling an referenced watcher should decrement the referenced count
276
276
$ loop ->cancel ($ watcherId2 );
277
- $ info = $ loop ->info ();
277
+ $ info = $ loop ->getInfo ();
278
278
$ expected = ["referenced " => 1 , "unreferenced " => 0 ];
279
279
$ this ->assertSame ($ expected , $ info ["watchers " ]);
280
280
281
281
// unreference() should just increment unreferenced count
282
282
$ watcherId2 = \call_user_func_array ($ func , $ args );
283
283
$ loop ->unreference ($ watcherId2 );
284
- $ info = $ loop ->info ();
284
+ $ info = $ loop ->getInfo ();
285
285
$ expected = ["enabled " => 2 , "disabled " => 0 ];
286
286
$ this ->assertSame ($ expected , $ info [$ type ]);
287
287
$ expected = ["referenced " => 1 , "unreferenced " => 1 ];
@@ -307,51 +307,51 @@ function testWatcherRegistrationAndCancellationInfo($type, $args)
307
307
308
308
$ watcherId = \call_user_func_array ($ func , $ args );
309
309
$ this ->assertInternalType ("string " , $ watcherId );
310
- $ info = $ loop ->info ();
310
+ $ info = $ loop ->getInfo ();
311
311
$ expected = ["enabled " => 1 , "disabled " => 0 ];
312
312
$ this ->assertSame ($ expected , $ info [$ type ]);
313
313
314
314
// invoke enable() on active watcher to ensure it has no side-effects
315
315
$ loop ->enable ($ watcherId );
316
- $ info = $ loop ->info ();
316
+ $ info = $ loop ->getInfo ();
317
317
$ expected = ["enabled " => 1 , "disabled " => 0 ];
318
318
$ this ->assertSame ($ expected , $ info [$ type ]);
319
319
320
320
// invoke disable() twice to ensure it has no side-effects
321
321
$ loop ->disable ($ watcherId );
322
322
$ loop ->disable ($ watcherId );
323
323
324
- $ info = $ loop ->info ();
324
+ $ info = $ loop ->getInfo ();
325
325
$ expected = ["enabled " => 0 , "disabled " => 1 ];
326
326
$ this ->assertSame ($ expected , $ info [$ type ]);
327
327
328
328
$ loop ->cancel ($ watcherId );
329
- $ info = $ loop ->info ();
329
+ $ info = $ loop ->getInfo ();
330
330
$ expected = ["enabled " => 0 , "disabled " => 0 ];
331
331
$ this ->assertSame ($ expected , $ info [$ type ]);
332
332
333
333
$ watcherId = \call_user_func_array ($ func , $ args );
334
- $ info = $ loop ->info ();
334
+ $ info = $ loop ->getInfo ();
335
335
$ expected = ["enabled " => 1 , "disabled " => 0 ];
336
336
$ this ->assertSame ($ expected , $ info [$ type ]);
337
337
338
338
$ loop ->disable ($ watcherId );
339
- $ info = $ loop ->info ();
339
+ $ info = $ loop ->getInfo ();
340
340
$ expected = ["enabled " => 0 , "disabled " => 1 ];
341
341
$ this ->assertSame ($ expected , $ info [$ type ]);
342
342
343
343
$ loop ->enable ($ watcherId );
344
- $ info = $ loop ->info ();
344
+ $ info = $ loop ->getInfo ();
345
345
$ expected = ["enabled " => 1 , "disabled " => 0 ];
346
346
$ this ->assertSame ($ expected , $ info [$ type ]);
347
347
348
348
$ loop ->cancel ($ watcherId );
349
- $ info = $ loop ->info ();
349
+ $ info = $ loop ->getInfo ();
350
350
$ expected = ["enabled " => 0 , "disabled " => 0 ];
351
351
$ this ->assertSame ($ expected , $ info [$ type ]);
352
352
353
353
$ loop ->disable ($ watcherId );
354
- $ info = $ loop ->info ();
354
+ $ info = $ loop ->getInfo ();
355
355
$ expected = ["enabled " => 0 , "disabled " => 0 ];
356
356
$ this ->assertSame ($ expected , $ info [$ type ]);
357
357
}
0 commit comments