/** * Deletes a record * * @param Number $id ID of record * * @return Response $response Result of the action */ public function deleteAction($id) { if ($this->fileManager->has($id)) { $this->fileManager->delete($id); } return parent::deleteAction($id); }
/** * Verifies the correct behavior of has method * * @return void */ public function testHas() { $this->fileSystem->expects($this->once())->method('has')->willReturn(true); $manager = new FileManager($this->fileSystem, $this->fileDocumentFactory); $this->assertTrue($manager->has('myKey')); }