Fix tests
modifié: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilderManagerTest.php modifié: core/lib/Thelia/Tests/ImportExport/Export/ProductPricesExportTest.php
This commit is contained in:
@@ -39,7 +39,34 @@ class ArchiveBuilderManagerTest extends \PHPUnit_Framework_TestCase
|
||||
public function testAddArchiveBuilder()
|
||||
{
|
||||
/** @var AbstractArchiveBuilder $instance */
|
||||
$instance = $this->getMock("Thelia\\Core\\FileFormat\\Archive\\AbstractArchiveBuilder");
|
||||
$instance = $this->getMock(
|
||||
"Thelia\\Core\\FileFormat\\Archive\\AbstractArchiveBuilder",
|
||||
[
|
||||
"isAvailable",
|
||||
"getName",
|
||||
"getExtension",
|
||||
"getMimeType",
|
||||
"addFile",
|
||||
"addFileFromString",
|
||||
"getFileContent",
|
||||
"deleteFile",
|
||||
"addDirectory",
|
||||
"buildArchiveResponse",
|
||||
"loadArchive",
|
||||
"hasFile",
|
||||
"hasDirectory",
|
||||
]
|
||||
);
|
||||
|
||||
$instance->expects($this->any())
|
||||
->method("isAvailable")
|
||||
->willReturn(true)
|
||||
;
|
||||
|
||||
$instance->expects($this->any())
|
||||
->method("getName")
|
||||
->willReturn("foo")
|
||||
;
|
||||
|
||||
$this->manager->add($instance);
|
||||
|
||||
@@ -53,7 +80,34 @@ class ArchiveBuilderManagerTest extends \PHPUnit_Framework_TestCase
|
||||
public function testDeleteArchiveBuilder()
|
||||
{
|
||||
/** @var AbstractArchiveBuilder $instance */
|
||||
$instance = $this->getMock("Thelia\\Core\\FileFormat\\Archive\\AbstractArchiveBuilder");
|
||||
$instance = $this->getMock(
|
||||
"Thelia\\Core\\FileFormat\\Archive\\AbstractArchiveBuilder",
|
||||
[
|
||||
"isAvailable",
|
||||
"getName",
|
||||
"getExtension",
|
||||
"getMimeType",
|
||||
"addFile",
|
||||
"addFileFromString",
|
||||
"getFileContent",
|
||||
"deleteFile",
|
||||
"addDirectory",
|
||||
"buildArchiveResponse",
|
||||
"loadArchive",
|
||||
"hasFile",
|
||||
"hasDirectory",
|
||||
]
|
||||
);
|
||||
|
||||
$instance->expects($this->any())
|
||||
->method("isAvailable")
|
||||
->willReturn(true)
|
||||
;
|
||||
|
||||
$instance->expects($this->any())
|
||||
->method("getName")
|
||||
->willReturn("foo")
|
||||
;
|
||||
|
||||
$this->manager->add($instance);
|
||||
|
||||
|
||||
@@ -74,7 +74,9 @@ class ProductPricesExportTest extends \PHPUnit_Framework_TestCase
|
||||
$attributes = [];
|
||||
|
||||
foreach ($attributeCombinations as $attributeCombination) {
|
||||
$attributes[] = $attributeCombination->getAttributeAv()->getTitle();
|
||||
if (!in_array($attributeCombination->getAttributeAv()->getTitle(), $attributes)) {
|
||||
$attributes[] = $attributeCombination->getAttributeAv()->getTitle();
|
||||
}
|
||||
}
|
||||
|
||||
$rowAttributes = explode(",", $row["attributes"]);
|
||||
|
||||
Reference in New Issue
Block a user