ScaleTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
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 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A itScalesDifferences() 0 13 1
1
<?php
2
3
namespace Undemanding\Difference\Test\Transformation;
4
5
use Undemanding\Difference\Test\Test;
6
use Undemanding\Difference\Transformation\Difference;
7
use Undemanding\Difference\Transformation\Scale;
8
9
class ScaleTest extends Test
10
{
11
    /**
12
     * @test
13
     */
14
    public function itScalesDifferences()
15
    {
16
        $transformation = new Scale();
17
18
        $bitmap1 = [[0, 0], [0, 1]];
19
        $expected1 = [[0, 0], [0, 10]];
20
21
        $bitmap2 = [[2, 1], [0, 0]];
22
        $expected2 = [[20, 10], [0, 0]];
23
24
        $this->assertEquals($expected1, $transformation($bitmap1, 2, 2, 1, 10));
25
        $this->assertEquals($expected2, $transformation($bitmap2, 2, 2, 2, 20));
26
    }
27
}
28