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

PostgresConnectionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetSchemaBuilder() 0 5 1
A setUp() 0 4 1
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