public function TaskQueueTest::testExecutesTasksInOrder in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/guzzlehttp/promises/tests/TaskQueueTest.php \GuzzleHttp\Promise\Test\TaskQueueTest::testExecutesTasksInOrder()
File
- vendor/
guzzlehttp/ promises/ tests/ TaskQueueTest.php, line 21
Class
Namespace
GuzzleHttp\Promise\TestCode
public function testExecutesTasksInOrder() {
$tq = new TaskQueue(false);
$called = [];
$tq
->add(function () use (&$called) {
$called[] = 'a';
});
$tq
->add(function () use (&$called) {
$called[] = 'b';
});
$tq
->add(function () use (&$called) {
$called[] = 'c';
});
$tq
->run();
$this
->assertEquals([
'a',
'b',
'c',
], $called);
}