create()); $worker->shutdown(); } public function testAutoloading(): void { $factory = new ContextWorkerFactory(__DIR__ . '/Fixtures/custom-bootstrap.php'); $worker = $factory->create(); self::assertTrue($worker->submit(new Fixtures\AutoloadTestTask)->await()); $worker->shutdown(); } public function testInvalidAutoloaderPath(): void { $this->expectException(\Error::class); $this->expectExceptionMessage('No file found at bootstrap path given'); $factory = new ContextWorkerFactory(__DIR__ . '/Fixtures/not-found.php'); $worker = $factory->create(); $worker->submit(new Fixtures\TestTask(42))->await(); } }