/** * @test */ public function deleteAttachment() { $pathname = 'some/path/file.ext'; $filename = 'file.ext'; $attachment = new Attachment(new File($pathname)); $this->fileStorageService->expects($this->once())->method('remove')->with($this->equalTo($filename)); $this->repository->expects($this->once())->method('remove')->with($this->equalTo($attachment)); $this->manager->deleteAttachment($attachment); }