/** * @depends testDownloadJSONToDir * @dataProvider getFilesList */ public function testDownloadToDir($fileName) { $Request = new Request(self::$_urlTestFiles . $fileName); $relPath = '/upload/obx.core/test/Request/download/gen_names/'; $Request->downloadToDir($relPath); $fileFullPath = self::$_docRoot . $relPath . $Request->getSavedFileName(); $this->assertEquals($fileFullPath, $Request->getSavedFilePath(false)); $this->assertFileExists($fileFullPath); $RequestRealNames = new Request(self::$_urlTestFiles . $fileName); $relPath = '/upload/obx.core/test/Request/download/real_names/'; $RequestRealNames->downloadToDir($relPath, Request::SAVE_TO_DIR_REPLACE); $fileFullPath = self::$_docRoot . $relPath . $RequestRealNames->getSavedFileName(); $this->assertEquals($fileFullPath, $RequestRealNames->getSavedFilePath(false)); $this->assertFileExists($fileFullPath); }