Skip to content

Commit

Permalink
Enhancement: Assert that override message is not displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 1, 2020
1 parent 287f20d commit 02b0f05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"ext-json": "*",
"php": "^7.1"
},
"_comment": "This composer.json is valid according to a lax validation, , a composer.lock is present and fresh before invoking the command, composer.json is not yet normalized, and composer.lock is not fresh after invoking the command."
"scripts": {
"hello": "echo 'Hello!'"
},
"_comment": "This composer.json is valid according to a lax validation, a composer.lock is present and fresh before invoking the command, composer.json is not yet normalized, and composer.lock is not fresh after invoking the command."
}
6 changes: 5 additions & 1 deletion test/Integration/Command/NormalizeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,12 +730,16 @@ public function testSucceedsWhenComposerJsonIsPresentAndValidAccordingToLaxValid

self::assertExitCodeSame(0, $exitCode);

$display = $output->fetch();

self::assertStringNotContainsString('A script named hello would override a Composer command and has been skipped', $display);

$expected = \sprintf(
'Successfully normalized %s.',
$scenario->composerJsonFileReference()
);

self::assertStringContainsString($expected, $output->fetch());
self::assertStringContainsString($expected, $display);

$currentState = $scenario->currentState();

Expand Down

0 comments on commit 02b0f05

Please sign in to comment.