We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 6 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 11 | class BaseIntegrationSpec extends TestCase { |
||
| 12 | protected static mysqli $conn; |
||
| 13 | private static $defaultPopulatedTables = array(); |
||
| 14 | |||
| 15 | public static function setUpBeforeClass(): void { |
||
| 16 | if (!isset(self::$conn)) { |
||
| 17 | $mysqlProperties = DiContainer::get(MySqlProperties::class); |
||
|
|
|||
| 18 | self::$conn = DiContainer::make(mysqli::class); |
||
| 19 | $query = "SELECT table_name FROM information_schema.tables WHERE table_rows > 0 AND TABLE_SCHEMA='smr_live'"; |
||
| 20 | $rs = self::$conn->query($query); |
||
| 21 | $all = $rs->fetch_all(); |
||
| 22 | array_walk_recursive($all, function($a) { |
||
| 23 | self::$defaultPopulatedTables[] = "'" . $a . "'"; |
||
| 24 | }); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function onNotSuccessfulTest(Throwable $t): void { |
||
| 29 | $this->cleanUp(); |
||
| 30 | throw $t; |
||
| 31 | } |
||
| 32 | |||
| 33 | protected function tearDown(): void { |
||
| 35 | } |
||
| 36 | |||
| 37 | protected function cleanUp() { |
||
| 47 |