Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function testLogging() |
||
13 | { |
||
14 | if (! class_exists(LoggerInterface::class)) { |
||
15 | $this->markTestSkipped('PSR-3 LoggerInterface is unavailable'); |
||
16 | } |
||
17 | |||
18 | $logger = $this->createMock(LoggerInterface::class); |
||
19 | $logger->expects($this->once()) |
||
20 | ->method('debug') |
||
21 | ->with('SELECT name FROM users WHERE id = ?', [ |
||
22 | 'params' => [1], |
||
23 | 'types' => [ParameterType::INTEGER], |
||
24 | ]); |
||
25 | |||
26 | $adapter = new PsrAdapter($logger); |
||
27 | $adapter->startQuery('SELECT name FROM users WHERE id = ?', [1], [ParameterType::INTEGER]); |
||
28 | } |
||
30 |