app->bind(ConsoleOutputInterface::class, function() { return new ConsoleOutput(); }); /** @var LoopInterface $loop */ $this->loop = $this->app->make(LoopInterface::class); } protected function await(PromiseInterface $promise, LoopInterface $loop = null, $timeout = null) { return await($promise, $loop ?? $this->loop, $timeout ?? static::AWAIT_TIMEOUT); } protected function assertDatabaseHasResults($query) { $database = app(DatabaseInterface::class); $result = $this->await($database->query($query)); $this->assertGreaterThanOrEqual(1, count($result->rows)); } }