示例#1
0
 /**
  * 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);
 }
示例#2
0
 /**
  * Verifies the correct behavior of read method
  *
  * @return void
  */
 public function testDelete()
 {
     $this->fileSystem->expects($this->once())->method('delete')->willReturn(true);
     $manager = new FileManager($this->fileSystem, $this->fileDocumentFactory);
     $this->assertTrue($manager->delete('myKey'));
 }