Completed
Push — master ( 6b2632...1706e7 )
by
unknown
07:57 queued 10s
created

tests/Unit/Filter/BaseTestCase.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
    public function setUp(): void
39
    {
40
        $this->qb = new QueryBuilder();
41
        $this->qbTester = new QueryBuilderTester($this->qb);
42
43
        $this->proxyQuery = $this->createMock(ProxyQuery::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->createMock(\Sonat...grid\ProxyQuery::class) of type object<PHPUnit\Framework\MockObject\MockObject> is incompatible with the declared type object<Sonata\DoctrinePH...le\Datagrid\ProxyQuery> of property $proxyQuery.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
44
        $this->proxyQuery->expects($this->any())
45
            ->method('getQueryBuilder')
46
            ->willReturn($this->qb);
47
    }
48
}
49