| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function __construct(string $appEnv, $dbUser, $dbPassword, $dbName, $hostName) |
||
| 32 | { |
||
| 33 | if ($appEnv !== 'smoketest') { |
||
| 34 | die('Behat tests should only run in smoketest'); |
||
|
|
|||
| 35 | } |
||
| 36 | |||
| 37 | $dsn = 'mysql:host=%s;dbname=%s'; |
||
| 38 | // Open a PDO connection |
||
| 39 | $this->connection = new PDO(sprintf($dsn, $hostName, $dbName), $dbUser, $dbPassword); |
||
| 40 | } |
||
| 50 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.