Completed
Push — webtests ( edc590 )
by Maximilian
01:56
created

BaseTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 12 1
1
<?php
2
3
/*
4
 * This file is part of the Sonata Project package.
5
 *
6
 * (c) Thomas Rabaix <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sonata\DoctrinePHPCRAdminBundle\Tests\Unit\Filter;
13
14
use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder;
15
use Doctrine\ODM\PHPCR\Tools\Test\QueryBuilderTester;
16
use Sonata\DoctrinePHPCRAdminBundle\Datagrid\ProxyQuery;
17
18
class BaseTestCase extends \PHPUnit_Framework_TestCase
19
{
20
    /**
21
     * @var QueryBuilder
22
     */
23
    protected $qb;
24
25
    /**
26
     * @var QueryBuilderTester
27
     */
28
    protected $qbTester;
29
30
    /**
31
     * @var ProxyQuery
32
     */
33
    protected $proxyQuery;
34
35
    public function setUp()
36
    {
37
        $this->qb = new QueryBuilder();
38
        $this->qbTester = new QueryBuilderTester($this->qb);
39
40
        $this->proxyQuery = $this->getMockBuilder('Sonata\DoctrinePHPCRAdminBundle\Datagrid\ProxyQuery')
41
            ->disableOriginalConstructor()
42
            ->getMock();
43
        $this->proxyQuery->expects($this->any())
44
            ->method('getQueryBuilder')
45
            ->will($this->returnValue($this->qb));
46
    }
47
}
48