1
0
Fork 0

test: Covers audit of pkg with no sec advisories (#11789)

pull/11688/head
theoboldalex 2024-02-07 10:40:29 +00:00 committed by GitHub
parent 0c99bfc8fd
commit 338bc16a11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -41,4 +41,20 @@ class AuditCommandTest extends TestCase
$appTester = $this->getApplicationTester(); $appTester = $this->getApplicationTester();
$appTester->run(['command' => 'audit', '--locked' => true]); $appTester->run(['command' => 'audit', '--locked' => true]);
} }
public function testAuditPackageWithNoSecurityVulnerabilities(): void
{
$this->initTempComposer();
$packages = [self::getPackage()];
$this->createInstalledJson($packages);
$this->createComposerLock($packages);
$appTester = $this->getApplicationTester();
$appTester->run(['command' => 'audit', '--locked' => true]);
self::assertStringContainsString(
'No security vulnerability advisories found.',
trim($appTester->getDisplay(true))
);
}
} }