Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | public function testGetApropriateConnectionBase(): void |
||
36 | { |
||
37 | // setup |
||
38 | $this->setConnection('default-db-connection'); |
||
39 | $mock = $this->getMockBase(); |
||
40 | $mock->setConnection(false); |
||
41 | $mock->expects($this->once()) |
||
42 | ->method('constructConnection') |
||
43 | ->willReturn(new PdoCrudMock()); |
||
44 | |||
45 | // test body |
||
46 | $connection = $mock->getApropriateConnection('default-db-connection'); |
||
47 | |||
48 | // assertions |
||
49 | $this->assertInstanceOf(PdoCrudMock::class, $connection); |
||
50 | } |
||
52 |