diff --git a/tests/Composer/Test/Command/AuditCommandTest.php b/tests/Composer/Test/Command/AuditCommandTest.php index 6bf751fab..4563e0fff 100644 --- a/tests/Composer/Test/Command/AuditCommandTest.php +++ b/tests/Composer/Test/Command/AuditCommandTest.php @@ -57,4 +57,20 @@ class AuditCommandTest extends TestCase trim($appTester->getDisplay(true)) ); } + + public function testAuditPackageWithNoDevOptionPassed(): void + { + $this->initTempComposer(); + $devPackage = [self::getPackage()]; + $this->createInstalledJson([], $devPackage); + $this->createComposerLock([], $devPackage); + + $appTester = $this->getApplicationTester(); + $appTester->run(['command' => 'audit', '--no-dev' => true]); + + self::assertStringContainsString( + 'No packages - skipping audit.', + trim($appTester->getDisplay(true)) + ); + } }