|
@@ 19-31 (lines=13) @@
|
| 16 |
|
/** |
| 17 |
|
* @dataProvider commitDataProvider |
| 18 |
|
*/ |
| 19 |
|
public function testFromGitCommitCheck( |
| 20 |
|
PackageInterface $package, |
| 21 |
|
string $command, |
| 22 |
|
int $exitCode, |
| 23 |
|
string $commandOutput, |
| 24 |
|
bool $expectedTrust, |
| 25 |
|
string $expectedHumanReadableStringFormat |
| 26 |
|
) : void { |
| 27 |
|
$check = GitSignatureCheck::fromGitCommitCheck($package, $command, $exitCode, $commandOutput); |
| 28 |
|
|
| 29 |
|
self::assertSame($expectedTrust, $check->canBeTrusted()); |
| 30 |
|
self::assertStringMatchesFormat($expectedHumanReadableStringFormat, $check->asHumanReadableString()); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
public function commitDataProvider() : array |
| 34 |
|
{ |
|
@@ 169-181 (lines=13) @@
|
| 166 |
|
/** |
| 167 |
|
* @dataProvider tagDataProvider |
| 168 |
|
*/ |
| 169 |
|
public function testFromGitTagCheck( |
| 170 |
|
PackageInterface $package, |
| 171 |
|
string $command, |
| 172 |
|
int $exitCode, |
| 173 |
|
string $commandOutput, |
| 174 |
|
bool $expectedTrust, |
| 175 |
|
string $expectedHumanReadableStringFormat |
| 176 |
|
) : void { |
| 177 |
|
$check = GitSignatureCheck::fromGitTagCheck($package, $command, $exitCode, $commandOutput); |
| 178 |
|
|
| 179 |
|
self::assertSame($expectedTrust, $check->canBeTrusted()); |
| 180 |
|
self::assertStringMatchesFormat($expectedHumanReadableStringFormat, $check->asHumanReadableString()); |
| 181 |
|
} |
| 182 |
|
|
| 183 |
|
public function tagDataProvider() : array |
| 184 |
|
{ |