mirror of
https://github.com/danog/amp.git
synced 2025-01-22 05:11:42 +01:00
Add Pause test coverage
This commit is contained in:
parent
0e6560070b
commit
0d14e906f8
@ -23,4 +23,14 @@ class PauseTest extends \PHPUnit_Framework_TestCase {
|
||||
[-1],
|
||||
];
|
||||
}
|
||||
|
||||
public function testPauseYield() {
|
||||
$endReached = false;
|
||||
(new NativeReactor)->run(function ($reactor) use (&$endReached) {
|
||||
$result = (yield new Pause(1, $reactor));
|
||||
$this->assertNull($result);
|
||||
$endReached = true;
|
||||
});
|
||||
$this->assertTrue($endReached);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user