Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 9, 2023
1 parent 892e057 commit c13c88c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Console/Command/DiffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,16 @@ public function test_it_cannot_compare_non_existent_files(): void

public function test_it_cannot_compare_a_non_phar_files(): void
{
$this->expectException(InvalidPhar::class);
$this->expectExceptionMessageMatches('/^Could not create a Phar or PharData instance for the file.+not\-a\-phar\.phar.+$/');

$this->commandTester->execute(
[
'command' => 'diff',
'pharA' => realpath(self::FIXTURES_DIR.'/simple-phar-foo.phar'),
'pharB' => realpath(self::FIXTURES_DIR.'/not-a-phar.phar'),
],
);

$expected = '/^Could not check the PHARs: Could not create a Phar or PharData instance for the file .+$/';

self::assertMatchesRegularExpression($expected, $this->commandTester->getDisplay(true));
self::assertSame(1, $this->commandTester->getStatusCode());
}

public function test_it_can_compare_phar_files_without_the_phar_extension(): void
Expand Down

0 comments on commit c13c88c

Please sign in to comment.