ZipArchiverTest.php 919 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Test\Package\Archiver;
  12. use Composer\Package\Archiver\ZipArchiver;
  13. /**
  14. * @author Till Klampaeckel <till@php.net>
  15. * @author Matthieu Moquet <matthieu@moquet.net>
  16. */
  17. class ZipArchiverTest extends ArchiverTest
  18. {
  19. public function testArchive()
  20. {
  21. $this->setupGitRepo();
  22. $package = $this->setupPackage();
  23. $target = sys_get_temp_dir().'/composer_archiver_test.zip';
  24. // Test archive
  25. $archiver = new ZipArchiver();
  26. $archiver->archive($package->getSourceUrl(), $target);
  27. $this->assertFileExists($target);
  28. unlink($target);
  29. $this->removeGitRepo();
  30. }
  31. }