diff --git a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php index 6c85126d5..4ad7dd063 100644 --- a/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php +++ b/tests/phpunit/src/Commands/Push/PushArtifactCommandTest.php @@ -24,9 +24,19 @@ protected function createCommand(): CommandBase return $this->injectCommand(PushArtifactCommand::class); } - public function testNoAuthenticationRequired(): void + public function testPushArtifactHelp(): void { $help = $this->command->getHelp(); + $expectedHelp = <<composer install, removing sensitive files, and committing vendor directories. + +Vendor directories and scaffold files are committed to the build artifact even if they are ignored in the source repository. + +To run additional build or sanitization steps (e.g. npm install), add a post-install-cmd script to your composer.json file: https://getcomposer.org/doc/articles/scripts.md#command-events + +This command is designed for a specific scenario in which there are two branches or repositories involved: a source branch without vendor files committed, and an artifact branch with them. If both your source and destination branches are the same, you should simply use git push instead. +EOF; + $this->assertEquals($expectedHelp, $help); $this->assertStringNotContainsString('This command requires authentication', $help); }