itCalculatesStandardDeviations()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Undemanding\Difference\Test\Calculation;
4
5
use Undemanding\Difference\Calculation\StandardDeviation;
6
use Undemanding\Difference\Test\Test;
7
8
class StandardDeviationTest extends Test
9
{
10
    /**
11
     * @test
12
     */
13
    public function itCalculatesStandardDeviations()
14
    {
15
        $calculation = new StandardDeviation();
16
17
        $this->assertEquals(0.5, $calculation([[0, 1], [0, 0]], 2, 2, 0.25));
18
        $this->assertEquals(0.58, round($calculation([[0, 1], [1, 0]], 2, 2, 0.5), 2));
19
    }
20
}
21