Completed
Push — 5.1 ( caeb2e...f14ddd )
by Kristof
70:09 queued 59:10
created

KunstmaanSeoExtensionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtensions() 4 4 1
A testCorrectParametersHaveBeenSet() 7 7 1

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
namespace Kunstmaan\RedirectBundle\Tests\DependencyInjection;
4
5
use Kunstmaan\SeoBundle\DependencyInjection\KunstmaanSeoExtension;
6
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
7
use Kunstmaan\AdminBundle\Tests\unit\AbstractPrependableExtensionTestCase;
8
9
/**
10
 * Class KunstmaanSeoExtensionTest
11
 */
12 View Code Duplication
class KunstmaanSeoExtensionTest extends AbstractPrependableExtensionTestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    /**
15
     * @return ExtensionInterface[]
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use KunstmaanSeoExtension[].

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
16
     */
17
    protected function getContainerExtensions()
18
    {
19
        return [new KunstmaanSeoExtension()];
20
    }
21
22
    public function testCorrectParametersHaveBeenSet()
23
    {
24
        $this->container->setParameter('empty_extension', true);
25
        $this->load();
26
27
        $this->assertContainerBuilderHasParameter('empty_extension', true);
28
    }
29
}
30