Completed
Push — master ( be0721...cced22 )
by Matthew
02:48
created

ApiHelperTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 28 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * This file contains only the ApiHelperTest class.
4
 */
5
6
namespace Tests\AppBundle\Helper;
7
8
use AppBundle\Helper\ApiHelper;
9
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
10
use Symfony\Component\DependencyInjection\Container;
11
12
/**
13
 * Tests of the ApiHelper class.
14
 * @group integration
15
 */
16
class ApiHelperTest extends WebTestCase
17
{
18
19
    /** @var Container The DI container. */
20
    protected $container;
21
22
    /** @var ApiHelper The API Helper object to test. */
23
    protected $apiHelper;
24
25
    /**
26
     * Set up the ApiHelper object for testing.
27
     */
28
    public function setUp()
29
    {
30
        $client = static::createClient();
31
        $this->container = $client->getContainer();
32
        $this->apiHelper = new ApiHelper($this->container);
33
        $this->cache = $this->container->get('cache.app');
34
    }
35
36
    public function testGroups()
37
    {
38
        // placeholder
39
    }
40
}
41