Project

General

Profile

Revision c3fb3bba

IDc3fb3bba60e89c40c8eb9cdedbebdbb5c773d33d
Parent 29d3d2ce
Child 145a5e49

Added by Andreas Kohlbecker 7 months ago

ref #8771 more test cases

View differences:

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

Add picture from clipboard (Maximum size: 40 MB)