ScaleTest::itScalesDifferences()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
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