/** * 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')); }
/** * Gathers information into a request * * @param Request $request master request sent by client. * * @return Request */ private function normalizeRequest(Request $request) { $contentData = $this->fileManager->extractDataFromRequestContent($request); $normalized = $request->duplicate(null, null, $contentData['attributes'], null, $contentData['files']); return $normalized; }