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

FindObjectsFromRawSqlQueryFactoryTest   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 7
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetSubQueryColumnDescriptors() 0 5 1
A testGetMagicSqlSubQuery() 0 5 1
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