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:
Benjamin Perche
2014-07-03 13:38:40 +02:00
parent 83cf3b59e0
commit ee2c383c73
4 changed files with 28 additions and 0 deletions

View File

@@ -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
}

View File

@@ -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
{

View File

@@ -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

View File

@@ -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
}
/**