1
0
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:
Daniel Lowrey 2015-07-20 22:28:51 -04:00
parent 0e6560070b
commit 0d14e906f8

View File

@ -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);
}
}