Passed
Pull Request — master (#161)
by David
02:48
created

testGetMagicSqlSubQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
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 PHPUnit\Framework\TestCase;
7
use TheCodingMachine\TDBM\TDBMAbstractServiceTest;
8
use TheCodingMachine\TDBM\TDBMException;
9
10
class FindObjectsFromRawSqlQueryFactoryTest extends TDBMAbstractServiceTest
11
{
12
13
    public function testGetSubQueryColumnDescriptors()
14
    {
15
        $queryFactory = new FindObjectsFromRawSqlQueryFactory($this->tdbmService, $this->createMock(Schema::class), 'foo', 'bar');
16
        $this->expectException(TDBMException::class);
17
        $queryFactory->getSubQueryColumnDescriptors();
18
    }
19
20
    public function testGetMagicSqlSubQuery()
21
    {
22
        $queryFactory = new FindObjectsFromRawSqlQueryFactory($this->tdbmService, $this->createMock(Schema::class), 'foo', 'bar');
23
        $this->expectException(TDBMException::class);
24
        $queryFactory->getMagicSqlSubQuery();
25
26
    }
27
}
28