repository = new InMemoryJobRepository(); $this->handler = new DeleteJobHandler($this->repository); } public function testItDeletesExistingJob(): void { $job = new ScrapingJob('job-1', 'manga-1', 1.0, 'source-1'); $this->repository->save($job); $this->handler->handle(new DeleteJob('job-1')); $this->assertNull($this->repository->get('job-1')); } public function testItThrowsWhenJobNotFound(): void { $this->expectException(JobNotFoundException::class); $this->handler->handle(new DeleteJob('non-existent-id')); } }