Passed
Push — testing ( 57c125...199f7f )
by Hennik
03:23
created

PostgresConnectionTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
use LaravelSpatial\PostgresConnection;
4
use LaravelSpatial\Schema\Builder;
5
use Stubs\PDOStub;
6
7
class PostgresConnectionTest extends PHPUnit_Framework_TestCase
8
{
9
    private $postgresConnection;
10
11
    protected function setUp()
12
    {
13
        $pgConfig = ['driver' => 'pgsql', 'prefix' => 'prefix', 'database' => 'database', 'name' => 'foo'];
14
        $this->postgresConnection = new PostgresConnection(new PDOStub(), 'database', 'prefix', $pgConfig);
15
    }
16
17
    public function testGetSchemaBuilder()
18
    {
19
        $builder = $this->postgresConnection->getSchemaBuilder();
20
21
        $this->assertInstanceOf(Builder::class, $builder);
22
    }
23
}
24