Revision c3fb3bba
Added by Andreas Kohlbecker almost 4 years ago
modules/cdm_dataportal/test/phpUnit/src/unit/StatisticalValuesTest.php | ||
---|---|---|
39 | 39 |
function test_statistical_values() { |
40 | 40 |
|
41 | 41 |
$stat_vals = $this->create_statistical_values(0.123457, 0.123456, 0.123456523847, 5); |
42 |
|
|
43 | 42 |
$this->assertEquals('0.123457–0.123456[5;x̄=0.1234565]', $this->html2text(statistical_values($stat_vals))); |
43 |
|
|
44 |
$stat_vals = $this->create_statistical_values(12.23, 14.2, 13.2231423, 15); |
|
45 |
$this->assertEquals('12.23–14.2[15;x̄=13.2]', $this->html2text(statistical_values($stat_vals))); |
|
46 |
|
|
47 |
$stat_vals = $this->create_statistical_values(4, 6, 5, 2); |
|
48 |
$this->assertEquals('4–6[2;x̄=5]', $this->html2text(statistical_values($stat_vals))); |
|
49 |
|
|
50 |
$stat_vals = $this->create_statistical_values(4, 6, 5.0000, 2); |
|
51 |
$this->assertEquals('4–6[2;x̄=5]', $this->html2text(statistical_values($stat_vals))); |
|
52 |
|
|
53 |
$stat_vals = $this->create_statistical_values(6.3467, 6.3482, 6.347034915, 20); |
|
54 |
$this->assertEquals('6.3467–6.3482[20;x̄=6.34703]', $this->html2text(statistical_values($stat_vals))); |
|
55 |
|
|
56 |
$stat_vals = $this->create_statistical_values(0.00000001, 1, (1 - 0.00000001) / 2, 20); |
|
57 |
$this->assertEquals('1.0E-8–1[20;x̄=0.5]', $this->html2text(statistical_values($stat_vals))); |
|
58 |
|
|
44 | 59 |
} |
45 | 60 |
|
46 | 61 |
} |
Also available in: Unified diff
ref #8771 more test cases