Completed
Push — master ( 06fa71...7f9e22 )
by David
21s queued 11s
created

testGetSubQueryColumnDescriptors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 3
c 3
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace TheCodingMachine\TDBM\QueryFactory;
4
5
use Doctrine\DBAL\Schema\Schema;
6
use TheCodingMachine\TDBM\TDBMAbstractServiceTest;
7
use TheCodingMachine\TDBM\TDBMException;
8
9
class FindObjectsFromRawSqlQueryFactoryTest extends TDBMAbstractServiceTest
10
{
11
    public function testGetSubQueryColumnDescriptors(): void
12
    {
13
        $queryFactory = new FindObjectsFromRawSqlQueryFactory($this->tdbmService, $this->tdbmService->getConnection()->getSchemaManager()->createSchema(), 'country', 'SELECT country.* FROM country');
14
        $this->expectException(TDBMException::class);
15
        $queryFactory->getSubQueryColumnDescriptors();
16
    }
17
18
    public function testGetMagicSqlSubQuery(): void
19
    {
20
        $queryFactory = new FindObjectsFromRawSqlQueryFactory($this->tdbmService, $this->tdbmService->getConnection()->getSchemaManager()->createSchema(), 'country', 'SELECT country.* FROM country');
21
        $this->expectException(TDBMException::class);
22
        $queryFactory->getMagicSqlSubQuery();
23
    }
24
}
25