Skip to content

Commit

Permalink
fix: add test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Pribelszki committed Nov 1, 2023
1 parent f1847b1 commit f42f147
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/unit/model/ZipExporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\StreamInterface;
use ZipArchive;

class ZipExporterTest extends TestCase
{
Expand Down Expand Up @@ -51,6 +52,28 @@ public function setUp(): void
->getMock();
}

public function testCreateZipFile()
{
$exportClasses = [
'foo'
];

$exportFiles = [
'foo' => [
$this->resourceMock
]
];

$zip = new ZipArchive();
$zip->open(self::TMP_TAO_EXPORT_TEST_ZIP, ZipArchive::CREATE);
$zip->addFile(__FILE__);
$zip->close();

$this->sut->createZipFile(self::FILENAME, $exportClasses, $exportFiles);

$this->addToAssertionCount(1);
}

/**
* @throws common_Exception
*/
Expand Down

0 comments on commit f42f147

Please sign in to comment.