DatabaseAwareTestCase::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Overwatch\UserBundle\Tests\Base;
4
5
use Liip\FunctionalTestBundle\Test\WebTestCase;
6
7
/**
8
 * DatabaseAwareTestCase
9
 * Extends LiipFunctionalTestBundle's web test case to add custom logic.
10
 * Includes ApiTestHelperTrait.
11
 */
12
class DatabaseAwareTestCase extends WebTestCase
13
{
14
    use ApiTestHelperTrait;
15
    
16
    protected $em;
17
    protected $client;
18
    
19
    public function setUp()
20
    {
21
        $this->client = static::createClient();
22
        
23
        $this->loadFixtures([
24
            'Overwatch\TestBundle\DataFixtures\ORM\TestGroupFixtures',
25
            'Overwatch\TestBundle\DataFixtures\ORM\TestFixtures',
26
            'Overwatch\ResultBundle\DataFixtures\ORM\TestResultFixtures',
27
            'Overwatch\UserBundle\DataFixtures\ORM\UserFixtures'
28
        ]);
29
        
30
        $this->em = $this->getContainer()->get('doctrine')->getManager();
31
    }
32
}
33