|
@@ 126-133 (lines=8) @@
|
| 123 |
|
* |
| 124 |
|
* @throws ExpectationFailedException |
| 125 |
|
*/ |
| 126 |
|
protected function packageShouldExists($package, $requirements, $reason) |
| 127 |
|
{ |
| 128 |
|
$message = sprintf('Package <fg=green>"%s"</> should be installed', $package); |
| 129 |
|
|
| 130 |
|
if (!key_exists($package, $requirements)) { |
| 131 |
|
throw new ExpectationFailedException($package, $message, $reason); |
| 132 |
|
} |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
/** |
| 136 |
|
* @param string $package |
|
@@ 142-149 (lines=8) @@
|
| 139 |
|
* |
| 140 |
|
* @throws ExpectationFailedException |
| 141 |
|
*/ |
| 142 |
|
protected function packageShouldNotExists($package, $requirements, $reason) |
| 143 |
|
{ |
| 144 |
|
$message = sprintf('Package <fg=green>"%s"</> should not be used', $package); |
| 145 |
|
|
| 146 |
|
if (key_exists($package, $requirements)) { |
| 147 |
|
throw new ExpectationFailedException($package, $message, $reason); |
| 148 |
|
} |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
/** |
| 152 |
|
* @return array |