DifferenceTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 24
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A itTransformsImagesToDifferences() 0 18 1
1
<?php
2
3
namespace Undemanding\Difference\Test\Transformation;
4
5
use Undemanding\Difference\Test\Test;
6
use Undemanding\Difference\Transformation\Difference;
7
8
class DifferenceTest extends Test
9
{
10
    /**
11
     * @test
12
     */
13
    public function itTransformsImagesToDifferences()
14
    {
15
        $transformation = new Difference();
16
17
        $bitmap1 = [[0, 0], [0, 1]];
18
        $bitmap2 = [[1, 0], [0, 0]];
19
20
        $method1 = function($p, $q) {
0 ignored issues
show
Unused Code introduced by
The parameter $q is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
21
            return $p;
22
        };
23
24
        $method2 = function($p, $q) {
25
            return $q;
26
        };
27
28
        $this->assertEquals($bitmap1, $transformation($bitmap1, $bitmap2, 2, 2, $method1));
29
        $this->assertEquals($bitmap2, $transformation($bitmap1, $bitmap2, 2, 2, $method2));
30
    }
31
}
32