Complete zip tests
modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/TarArchiveBuilder.php modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderInterface.php modifié: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/TarArchiveBuilderTest.php modifié: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/ZipArchiveBuilderTest.php
This commit is contained in:
@@ -121,11 +121,15 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
* Download the file if it is online
|
||||
* If it's local check if the file exists and if it is redable
|
||||
*/
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
$fileDownloadCache = $this->cacheDir . DS . md5(uniqid()) . ".tmp";
|
||||
=======
|
||||
$fileDownloadCache = $this->cacheDir . DS . "download.tmp";
|
||||
>>>>>>> Finish implementing and testing zip
|
||||
=======
|
||||
$fileDownloadCache = $this->cacheDir . DS . md5(uniqid()) . ".tmp";
|
||||
>>>>>>> Complete zip tests
|
||||
$this->copyFile($filePath, $fileDownloadCache, $isOnline);
|
||||
|
||||
/**
|
||||
@@ -253,6 +257,7 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
*/
|
||||
public function getFileContent($pathToFile)
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
$pathToFile = $this->formatFilePath($pathToFile);
|
||||
|
||||
@@ -276,6 +281,9 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
|
||||
=======
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> Complete zip tests
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,11 +18,15 @@ use Thelia\Tools\FileDownload\FileDownloaderInterface;
|
||||
* @package Thelia\Core\FileFormat\Archive
|
||||
* @author Benjamin Perche <bperche@openstudio.fr>
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
* This interface defines the methods that an archive builder must have.
|
||||
=======
|
||||
* This interface defines the methods that an archive creator must have.
|
||||
>>>>>>> Define archive builders and formatters
|
||||
=======
|
||||
* This interface defines the methods that an archive builder must have.
|
||||
>>>>>>> Complete zip tests
|
||||
*/
|
||||
interface ArchiveBuilderInterface
|
||||
{
|
||||
|
||||
@@ -91,10 +91,14 @@ class TarArchiveBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> Complete zip tests
|
||||
|
||||
public function testAddValidFileFromString()
|
||||
{
|
||||
$this->tar->addFileFromString(
|
||||
<<<<<<< HEAD
|
||||
"foo", "bar"
|
||||
);
|
||||
|
||||
@@ -301,3 +305,9 @@ class TarArchiveBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
=======
|
||||
}
|
||||
>>>>>>> Finish implementing and testing zip
|
||||
=======
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
>>>>>>> Complete zip tests
|
||||
|
||||
@@ -596,6 +596,9 @@ class ZipArchiveBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->loadedZip->getFileContent("bar")
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> Complete zip tests
|
||||
|
||||
$this->loadedZip->addFileFromString(
|
||||
"foo", "bar", "baz"
|
||||
@@ -609,8 +612,11 @@ class ZipArchiveBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
"foo",
|
||||
$this->loadedZip->getFileContent("baz/bar")
|
||||
);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> Finish implementing and testing zip
|
||||
=======
|
||||
>>>>>>> Complete zip tests
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user