Browse Source

Fix AsyncBusTests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v16.0.0alpha1
Roeland Jago Douma 5 years ago
parent
commit
843066b708
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      tests/lib/Command/AsyncBusTest.php

+ 2
- 2
tests/lib/Command/AsyncBusTest.php View File



public function testClosureSelf() { public function testClosureSelf() {
$this->getBus()->push(function () { $this->getBus()->push(function () {
self::$lastCommand = 'closure-self';
AsyncBusTest::$lastCommand = 'closure-self';
}); });
$this->runJobs(); $this->runJobs();
$this->assertEquals('closure-self', self::$lastCommand); $this->assertEquals('closure-self', self::$lastCommand);
public function testClosureBind() { public function testClosureBind() {
$state = 'bar'; $state = 'bar';
$this->getBus()->push(function () use ($state) { $this->getBus()->push(function () use ($state) {
self::$lastCommand = 'closure-' . $state;
AsyncBusTest::$lastCommand = 'closure-' . $state;
}); });
$this->runJobs(); $this->runJobs();
$this->assertEquals('closure-bar', self::$lastCommand); $this->assertEquals('closure-bar', self::$lastCommand);

Loading…
Cancel
Save