| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class ConnectionFactoryBaseTest extends BaseTestCase |
||
| 10 | { |
||
| 11 | public function testMysqlMakeCallsCreateConnection() |
||
| 12 | { |
||
| 13 | $pdo = new PDOStub(); |
||
| 14 | |||
| 15 | $factory = Mockery::mock(ConnectionFactory::class, [new Container()])->makePartial(); |
||
| 16 | $factory->shouldAllowMockingProtectedMethods(); |
||
| 17 | $conn = $factory->createConnection('mysql', $pdo, 'database'); |
||
| 18 | |||
| 19 | $this->assertInstanceOf(MysqlConnection::class, $conn); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function testPostgresMakeCallsCreateConnection() |
||
| 23 | { |
||
| 24 | $pdo = new PDOStub(); |
||
| 25 | |||
| 26 | $factory = Mockery::mock(ConnectionFactory::class, [new Container()])->makePartial(); |
||
| 27 | $factory->shouldAllowMockingProtectedMethods(); |
||
| 28 | $conn = $factory->createConnection('pgsql', $pdo, 'database'); |
||
| 29 | |||
| 30 | $this->assertInstanceOf(PostgresConnection::class, $conn); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testCreateConnectionDifferentDriver() |
||
| 42 | } |
||
| 43 | } |
||
| 44 |