BaseTestCase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A getContainer() 0 4 1
A getLoggerMock() 0 8 1
1
<?php
2
3
namespace Cmobi\RabbitmqBundle\Tests;
4
5
use Monolog\Logger;
6
use Psr\Log\LoggerInterface;
7
use Symfony\Component\DependencyInjection\Container;
8
9
class BaseTestCase extends \PHPUnit_Framework_TestCase
10
{
11
    private $container;
12
13
    protected function setUp()
14
    {
15
        $kernel = new \AppKernel('test', true);
16
        $kernel->boot();
17
        $this->container = $kernel->getContainer();
18
    }
19
20
    /**
21
     * @return Container
22
     */
23
    protected function getContainer()
24
    {
25
        return $this->container;
26
    }
27
28
    /**
29
     * @return LoggerInterface
30
     */
31
    protected function getLoggerMock()
32
    {
33
        $logger = $this->getMockBuilder(Logger::class)
34
            ->disableOriginalConstructor()
35
            ->getMock();
36
37
        return $logger;
38
    }
39
}
40