@@ -349,6 +349,11 @@ function testWatcherRegistrationAndCancellationInfo($type, $args)
349
349
$ info = $ loop ->info ();
350
350
$ expected = ["enabled " => 0 , "disabled " => 0 ];
351
351
$ this ->assertSame ($ expected , $ info [$ type ]);
352
+
353
+ $ loop ->disable ($ watcherId );
354
+ $ info = $ loop ->info ();
355
+ $ expected = ["enabled " => 0 , "disabled " => 0 ];
356
+ $ this ->assertSame ($ expected , $ info [$ type ]);
352
357
}
353
358
354
359
/** @dataProvider provideRegistrationArgs */
@@ -610,8 +615,7 @@ function testExceptionOnEnableNonexistentWatcher()
610
615
$ this ->loop ->enable ("nonexistentWatcher " );
611
616
}
612
617
613
- /** @expectedException \Interop\Async\Loop\InvalidWatcherException */
614
- function testExceptionOnDisableNonexistentWatcher ()
618
+ function testSuccessOnDisableNonexistentWatcher ()
615
619
{
616
620
$ this ->loop ->disable ("nonexistentWatcher " );
617
621
}
@@ -637,7 +641,7 @@ function testExceptionOnUnreferenceNonexistentWatcher()
637
641
function testWatcherInvalidityOnDefer () {
638
642
$ this ->start (function (Driver $ loop ) {
639
643
$ loop ->defer (function ($ watcher ) use ($ loop ) {
640
- $ loop ->disable ($ watcher );
644
+ $ loop ->enable ($ watcher );
641
645
});
642
646
});
643
647
}
@@ -646,7 +650,7 @@ function testWatcherInvalidityOnDefer() {
646
650
function testWatcherInvalidityOnDelay () {
647
651
$ this ->start (function (Driver $ loop ) {
648
652
$ loop ->delay ($ msDelay = 0 , function ($ watcher ) use ($ loop ) {
649
- $ loop ->disable ($ watcher );
653
+ $ loop ->enable ($ watcher );
650
654
});
651
655
});
652
656
}
0 commit comments