Passed
Push — main ( 29cbd1...100eac )
by Peter
02:37
created

QueryBuilderTest::testSelect()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace QB\MySQL\QueryBuilder;
6
7
use QB\Generic\QueryBuilder\IQueryBuilder;
8
use QB\Generic\QueryBuilder\QueryBuilderTest as GenericQueryBuilderTest;
9
use QB\MySQL\Statement\Select;
10
11
class QueryBuilderTest extends GenericQueryBuilderTest
12
{
13
    /** @var QueryBuilder */
14
    protected IQueryBuilder $sut;
15
16
    public function setUp(): void
17
    {
18
        $this->sut = new QueryBuilder();
19
    }
20
21
    public function testSelect()
22
    {
23
        $select = $this->sut->select()->addFrom('foo');
24
25
        $this->assertInstanceOf(Select::class, $select);
26
        $this->assertSame("SELECT *\nFROM foo", (string)$select);
27
    }
28
}
29