Test Setup Failed
Push — master ( 298fd3...56daff )
by Matthew
17:14
created

JobTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testSetArgs() 9 9 1
A testGettersSetters() 4 4 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 Dtc\QueueBundle\Tests\Document;
4
5
use Dtc\QueueBundle\Tests\GetterSetterTrait;
6
use PHPUnit\Framework\TestCase;
7
8 View Code Duplication
class JobTest extends TestCase
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...
9
{
10
    use GetterSetterTrait;
11
12
    public function testSetArgs()
13
    {
14
        $args = [1, 2, ['something']];
15
16
        $job = new \Dtc\QueueBundle\Document\Job();
17
18
        $job->setArgs($args);
19
        self::assertEquals($args, $job->getArgs());
20
    }
21
22
    public function testGettersSetters()
23
    {
24
        $this->runGetterSetterTests('Dtc\QueueBundle\Document\Job');
25
    }
26
}
27