repository = new InMemoryJobRepository(); $this->handler = new DeleteJobHandler($this->repository); } public function test_it_deletes_existing_job(): 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 test_it_throws_when_job_not_found(): void { $this->expectException(JobNotFoundException::class); $this->handler->handle(new DeleteJob('non-existent-id')); } }