Passed
Pull Request — master (#6748)
by Konstantin
17:18
created

QueryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 22
rs 10
c 2
b 0
f 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testSetResultCacheProfile() 0 6 1
1
<?php
2
3
namespace Doctrine\Tests\ORM;
4
5
use Doctrine\Tests\Models\CMS\CmsUser;
6
use Doctrine\Tests\OrmTestCase;
7
8
/**
9
 * Test case for the Query class
10
 *
11
 * @author Konstantin Kuklin <[email protected]>
12
 */
13
class QueryTest extends OrmTestCase
14
{
15
    /**
16
     * @var \Doctrine\ORM\EntityManager
17
     */
18
    private $_em;
19
20
    protected function setUp()
21
    {
22
        $this->_em = $this->_getTestEntityManager();
23
    }
24
25
    /**
26
     * setResultCacheProfile should works correct with null
27
     */
28
    public function testSetResultCacheProfile()
29
    {
30
        $query = $this->_em->createQuery('SELECT u FROM ' . CmsUser::class . ' u');
31
        $result = $query->setResultCacheProfile(null);
32
        self::assertEquals($result, $query);
33
    }
34
}
35