Skip to content

Commit 66bceb8

Browse files
committed
info() → getInfo()
1 parent 2c0d606 commit 66bceb8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/Test.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function testWatcherReferenceInfo($type, $args)
240240

241241
// being referenced is the default
242242
$watcherId1 = \call_user_func_array($func, $args);
243-
$info = $loop->info();
243+
$info = $loop->getInfo();
244244
$expected = ["enabled" => 1, "disabled" => 0];
245245
$this->assertSame($expected, $info[$type]);
246246
$expected = ["referenced" => 1, "unreferenced" => 0];
@@ -251,7 +251,7 @@ function testWatcherReferenceInfo($type, $args)
251251
$watcherId2 = \call_user_func_array($func, $argsCopy);
252252
$loop->reference($watcherId2);
253253
$loop->reference($watcherId2);
254-
$info = $loop->info();
254+
$info = $loop->getInfo();
255255
$expected = ["enabled" => 2, "disabled" => 0];
256256
$this->assertSame($expected, $info[$type]);
257257
$expected = ["referenced" => 2, "unreferenced" => 0];
@@ -261,27 +261,27 @@ function testWatcherReferenceInfo($type, $args)
261261
$loop->disable($watcherId2);
262262
$loop->disable($watcherId2);
263263
$loop->disable($watcherId2);
264-
$info = $loop->info();
264+
$info = $loop->getInfo();
265265
$expected = ["referenced" => 1, "unreferenced" => 0];
266266
$this->assertSame($expected, $info["watchers"]);
267267

268268
// enabling a referenced watcher should increment the referenced count
269269
$loop->enable($watcherId2);
270270
$loop->enable($watcherId2);
271-
$info = $loop->info();
271+
$info = $loop->getInfo();
272272
$expected = ["referenced" => 2, "unreferenced" => 0];
273273
$this->assertSame($expected, $info["watchers"]);
274274

275275
// cancelling an referenced watcher should decrement the referenced count
276276
$loop->cancel($watcherId2);
277-
$info = $loop->info();
277+
$info = $loop->getInfo();
278278
$expected = ["referenced" => 1, "unreferenced" => 0];
279279
$this->assertSame($expected, $info["watchers"]);
280280

281281
// unreference() should just increment unreferenced count
282282
$watcherId2 = \call_user_func_array($func, $args);
283283
$loop->unreference($watcherId2);
284-
$info = $loop->info();
284+
$info = $loop->getInfo();
285285
$expected = ["enabled" => 2, "disabled" => 0];
286286
$this->assertSame($expected, $info[$type]);
287287
$expected = ["referenced" => 1, "unreferenced" => 1];
@@ -307,51 +307,51 @@ function testWatcherRegistrationAndCancellationInfo($type, $args)
307307

308308
$watcherId = \call_user_func_array($func, $args);
309309
$this->assertInternalType("string", $watcherId);
310-
$info = $loop->info();
310+
$info = $loop->getInfo();
311311
$expected = ["enabled" => 1, "disabled" => 0];
312312
$this->assertSame($expected, $info[$type]);
313313

314314
// invoke enable() on active watcher to ensure it has no side-effects
315315
$loop->enable($watcherId);
316-
$info = $loop->info();
316+
$info = $loop->getInfo();
317317
$expected = ["enabled" => 1, "disabled" => 0];
318318
$this->assertSame($expected, $info[$type]);
319319

320320
// invoke disable() twice to ensure it has no side-effects
321321
$loop->disable($watcherId);
322322
$loop->disable($watcherId);
323323

324-
$info = $loop->info();
324+
$info = $loop->getInfo();
325325
$expected = ["enabled" => 0, "disabled" => 1];
326326
$this->assertSame($expected, $info[$type]);
327327

328328
$loop->cancel($watcherId);
329-
$info = $loop->info();
329+
$info = $loop->getInfo();
330330
$expected = ["enabled" => 0, "disabled" => 0];
331331
$this->assertSame($expected, $info[$type]);
332332

333333
$watcherId = \call_user_func_array($func, $args);
334-
$info = $loop->info();
334+
$info = $loop->getInfo();
335335
$expected = ["enabled" => 1, "disabled" => 0];
336336
$this->assertSame($expected, $info[$type]);
337337

338338
$loop->disable($watcherId);
339-
$info = $loop->info();
339+
$info = $loop->getInfo();
340340
$expected = ["enabled" => 0, "disabled" => 1];
341341
$this->assertSame($expected, $info[$type]);
342342

343343
$loop->enable($watcherId);
344-
$info = $loop->info();
344+
$info = $loop->getInfo();
345345
$expected = ["enabled" => 1, "disabled" => 0];
346346
$this->assertSame($expected, $info[$type]);
347347

348348
$loop->cancel($watcherId);
349-
$info = $loop->info();
349+
$info = $loop->getInfo();
350350
$expected = ["enabled" => 0, "disabled" => 0];
351351
$this->assertSame($expected, $info[$type]);
352352

353353
$loop->disable($watcherId);
354-
$info = $loop->info();
354+
$info = $loop->getInfo();
355355
$expected = ["enabled" => 0, "disabled" => 0];
356356
$this->assertSame($expected, $info[$type]);
357357
}

0 commit comments

Comments
 (0)