BaseTestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

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