Completed
Push — master ( ac629c...442bc4 )
by Robbie
9s
created

ProxyDBExtensionTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace LeKoala\DebugBar\Test\Extension;
3
4
use SilverStripe\Dev\SapphireTest;
5
use SilverStripe\ORM\Connect\DBConnector;
6
use SilverStripe\ORM\Connect\DBSchemaManager;
7
use SilverStripe\ORM\Connect\DBQueryBuilder;
8
use SilverStripe\ORM\Connect\MySQLDatabase;
9
use SilverStripe\ORM\Connect\MySQLiConnector;
10
use SilverStripe\ORM\Connect\MySQLSchemaManager;
11
use SilverStripe\ORM\Connect\MySQLQueryBuilder;
12
use SilverStripe\ORM\DB;
13
use LeKoala\DebugBar\Extension\ProxyDBExtension;
14
15
class ProxyDBExtensionTest extends SapphireTest
16
{
17
    /**
18
     * @var SilverStripe\ORM\Connect\Database
0 ignored issues
show
Bug introduced by
The type LeKoala\DebugBar\Test\Ex...pe\ORM\Connect\Database was not found. Did you mean SilverStripe\ORM\Connect\Database? If so, make sure to prefix the type with \.
Loading history...
19
     */
20
    protected $conn;
21
22
    public function setUp()
23
    {
24
        parent::setUp();
25
        $this->conn = DB::get_conn();
0 ignored issues
show
Documentation Bug introduced by
It seems like SilverStripe\ORM\DB::get_conn() of type SilverStripe\ORM\Connect\Database is incompatible with the declared type LeKoala\DebugBar\Test\Ex...pe\ORM\Connect\Database of property $conn.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
26
    }
27
28
    public function testQueriesAreCollected() {
29
        $this->assertNotEmpty(ProxyDBExtension::getQueries());
30
    }
31
}
32