ZipTest.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Archive\Test\Unit;
  7. use Composer\Composer;
  8. class ZipTest extends \PHPUnit\Framework\TestCase
  9. {
  10. /**
  11. * @var \Magento\Framework\Archive\Zip|\PHPUnit_Framework_MockObject_MockObject
  12. */
  13. protected $zip;
  14. protected function setUp()
  15. {
  16. $this->zip = $this->getMockBuilder(\Magento\Framework\Archive\Zip::class)
  17. ->disableOriginalConstructor()
  18. ->getMock();
  19. }
  20. /**
  21. * Check constructor if no exceptions is thrown.
  22. */
  23. public function testConstructorNoExceptions()
  24. {
  25. try {
  26. $reflectedClass = new \ReflectionClass(\Magento\Framework\Archive\Zip::class);
  27. $constructor = $reflectedClass->getConstructor();
  28. $constructor->invoke($this->zip, []);
  29. } catch (\Exception $e) {
  30. $this->fail('Failed asserting that no exceptions is thrown');
  31. }
  32. }
  33. /**
  34. * @depends testConstructorNoExceptions
  35. */
  36. public function testPack()
  37. {
  38. $this->markTestSkipped('Method pack contains dependency on \ZipArchive object');
  39. }
  40. /**
  41. * @depends testConstructorNoExceptions
  42. */
  43. public function testUnpack()
  44. {
  45. $this->markTestSkipped('Method unpack contains dependency on \ZipArchive object');
  46. }
  47. }