| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class LoggerChainTest extends TestCase |
||
| 13 | { |
||
| 14 | public function testStartQuery() : void |
||
| 15 | { |
||
| 16 | $sql = 'SELECT ?'; |
||
| 17 | $params = [1]; |
||
| 18 | $types = [ParameterType::INTEGER]; |
||
| 19 | |||
| 20 | $listener = $this->createChain('startQuery', $sql, $params, $types); |
||
| 21 | $listener->startQuery($sql, $params, $types); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function testStopQuery() : void |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param mixed ...$args |
||
| 32 | */ |
||
| 33 | private function createChain(string $method, ...$args) : LoggerChain |
||
| 34 | { |
||
| 35 | return new LoggerChain([ |
||
| 36 | $this->createLogger($method, ...$args), |
||
| 37 | $this->createLogger($method, ...$args), |
||
| 38 | ]); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param mixed ...$args |
||
| 43 | */ |
||
| 44 | private function createLogger(string $method, ...$args) : SQLLogger |
||
| 52 | } |
||
| 53 | } |
||
| 54 |