PharCheckerTest.php 851 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. namespace PhpCsFixer\Tests;
  12. use PhpCsFixer\PharChecker;
  13. /**
  14. * @author SpacePossum
  15. *
  16. * @internal
  17. *
  18. * @covers \PhpCsFixer\PharChecker
  19. */
  20. final class PharCheckerTest extends TestCase
  21. {
  22. public function testPharChecker()
  23. {
  24. $checker = new PharChecker();
  25. $this->assertNull($checker->checkFileValidity(__DIR__.'/Fixtures/empty.phar'));
  26. }
  27. public function testPharCheckerInvalidFile()
  28. {
  29. $checker = new PharChecker();
  30. $this->assertStringStartsWith('Failed to create Phar instance.', $checker->checkFileValidity(__FILE__));
  31. }
  32. }