Skip to content

Commit

Permalink
Fix ListAliasesTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jhatlak committed Oct 21, 2024
1 parent 245cf62 commit 90ca13d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Phinx/Console/Command/ListAliasesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,18 @@ public function testListingAliases($file, $hasAliases)
],
['decorated' => false]
);
$expectedExitCode = $hasAliases ? AbstractCommand::CODE_SUCCESS : AbstractCommand::CODE_ERROR;
$this->assertSame($expectedExitCode, $exitCode);
$this->assertSame(AbstractCommand::CODE_SUCCESS, $exitCode);

$display = $commandTester->getDisplay(false);

if ($hasAliases) {
$this->assertStringNotContainsString('No aliases defined in ', $display);
$this->assertStringNotContainsString('no aliases defined in ', $display);
$this->assertStringContainsString('Alias Class ', $display);
$this->assertStringContainsString('================ ==================================================', $display);
$this->assertStringContainsString('MakePermission Vendor\Package\Migration\Creation\MakePermission ', $display);
$this->assertStringContainsString('RemovePermission Vendor\Package\Migration\Creation\RemovePermission', $display);
} else {
$this->assertStringContainsString('No aliases defined in ', $display);
$this->assertStringContainsString('no aliases defined in ', $display);
}
}
}

0 comments on commit 90ca13d

Please sign in to comment.