Test on ProgressMeter implementation.  
 More...
Test on ProgressMeter implementation. 
Definition at line 30 of file ChartProgressMeterTest.php.
 
◆ getFactory()
  
  
      
        
          | ChartProgressMeterTest::getFactory  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ testGetInstances()
      
        
          | ChartProgressMeterTest::testGetInstances  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 44 of file ChartProgressMeterTest.php.
References getFactory().
   48         $standard = $progressmeter->standard(400, 250);
    49         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\Standard", $standard);
    51         $fixedSize = $progressmeter->fixedSize(400, 250);
    52         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\FixedSize", $fixedSize);
    54         $mini = $progressmeter->mini(400, 250);
    55         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\Mini", $mini);
 
 
 
 
◆ testGetValuesOfFixedSize()
      
        
          | ChartProgressMeterTest::testGetValuesOfFixedSize  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 72 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, and getFactory().
   75         $fixedSize = 
$f->fixedSize(400, 250, 300, 200);
    77         $this->assertEquals(400, $fixedSize->getMaximum());
    78         $this->assertEquals(250, $fixedSize->getMainValue());
    79         $this->assertEquals(63, $fixedSize->getMainValueAsPercent());
    80         $this->assertEquals(300, $fixedSize->getRequired());
    81         $this->assertEquals(75, $fixedSize->getRequiredAsPercent());
    82         $this->assertEquals(200, $fixedSize->getComparison());
    83         $this->assertEquals(50, $fixedSize->getComparisonAsPercent());
 
 
 
 
◆ testGetValuesOfMini()
      
        
          | ChartProgressMeterTest::testGetValuesOfMini  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 86 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, and getFactory().
   89         $mini = 
$f->mini(400, 250, 300);
    91         $this->assertEquals(400, $mini->getMaximum());
    92         $this->assertEquals(250, $mini->getMainValue());
    93         $this->assertEquals(63, $mini->getMainValueAsPercent());
    94         $this->assertEquals(300, $mini->getRequired());
    95         $this->assertEquals(75, $mini->getRequiredAsPercent());
 
 
 
 
◆ testGetValuesOfStandard()
      
        
          | ChartProgressMeterTest::testGetValuesOfStandard  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 58 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, and getFactory().
   61         $standard = 
$f->standard(400, 250, 300, 200);
    63         $this->assertEquals(400, $standard->getMaximum());
    64         $this->assertEquals(250, $standard->getMainValue());
    65         $this->assertEquals(63, $standard->getMainValueAsPercent());
    66         $this->assertEquals(300, $standard->getRequired());
    67         $this->assertEquals(75, $standard->getRequiredAsPercent());
    68         $this->assertEquals(200, $standard->getComparison());
    69         $this->assertEquals(50, $standard->getComparisonAsPercent());
 
 
 
 
◆ testImplementsFactoryInterface()
      
        
          | ChartProgressMeterTest::testImplementsFactoryInterface  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testRenderFixedSizeOneBar()
      
        
          | ChartProgressMeterTest::testRenderFixedSizeOneBar  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 139 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, $r, and getFactory().
  141         $r = $this->getDefaultRenderer();
   143         $fixedSize = 
$f->fixedSize(100, 75, 80, null, 300);
   145         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\FixedSize", $fixedSize);
   147         $html = 
$r->render($fixedSize);
   150             '<div class="il-chart-progressmeter-box fixed-size">' .
   151             '<div class="il-chart-progressmeter-container">' .
   152             '<svg viewBox="0 0 50 40" class="il-chart-progressmeter-viewbox">' .
   153             '<path class="il-chart-progressmeter-circle-bg" stroke-dasharray="100, 100" ' .
   154             'd="M10.4646,37.0354 q-5.858,-5.858 -5.858,-14.142 a1,1 0 1,1 40,0 q0,8.284 -5.858,14.142"></path>' .
   155             '<g class="il-chart-progressmeter-monocircle">' .
   156             '<path class="il-chart-progressmeter-circle no-success" stroke-dasharray="71, 100" ' .
   157             'd="M10.4646,37.0354 q-5.858,-5.858 -5.858,-14.142 a1,1 0 1,1 40,0 q0,8.284 -5.858,14.142"></path>' .
   159             '<g class="il-chart-progressmeter-text">' .
   160             '<text class="text-score-info" x="25" y="16"></text>' .
   161             '<text class="text-score" x="25" y="25">75 %</text>' .
   162             '<text class="text-comparision" x="25" y="31">80 %</text>' .
   163             '<text class="text-comparision-info" x="25" y="34"></text>' .
   165             '<g class="il-chart-progressmeter-needle " style="transform: rotate(86.5deg)">' .
   166             '<polygon class="il-chart-progressmeter-needle-border" points="23.5,0.1 25,2.3 26.5,0.1"></polygon>' .
   167             '<polygon class="il-chart-progressmeter-needle-fill" points="23.5,0 25,2.2 26.5,0"></polygon>' .
   173         $this->assertHTMLEquals($expected_html, $html);
 
 
 
 
◆ testRenderMini()
      
        
          | ChartProgressMeterTest::testRenderMini  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 176 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, $r, and getFactory().
  178         $r = $this->getDefaultRenderer();
   180         $mini = 
$f->mini(400, 250, 300);
   182         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\Mini", $mini);
   184         $html = 
$r->render($mini);
   187             '<div class="il-chart-progressmeter-box il-chart-progressmeter-mini">' .
   188             '<div class="il-chart-progressmeter-container">' .
   189             '<svg viewBox="0 0 50 40" class="il-chart-progressmeter-viewbox">' .
   190             '<path class="il-chart-progressmeter-circle-bg" stroke-dasharray="100, 100" ' .
   191             'd="M9,35 q-4.3934,-4.3934 -4.3934,-10.6066 a1,1 0 1,1 40,0 q0,6.2132 -4.3934,10.6066"></path>' .
   192             '<path class="il-chart-progressmeter-circle no-success" stroke-dasharray="54.495, 100" ' .
   193             'd="M9,35 q-4.3934,-4.3934 -4.3934,-10.6066 a1,1 0 1,1 40,0 q0,6.2132 -4.3934,10.6066"></path>' .
   194             '<path class="il-chart-progressmeter-needle " stroke-dasharray="100, 100" d="M25,10 l0,15" ' .
   195             'style="transform: rotate(65.5deg)"></path>' .
   200         $this->assertHTMLEquals($expected_html, $html);
 
 
 
 
◆ testRenderStandardTwoBar()
      
        
          | ChartProgressMeterTest::testRenderStandardTwoBar  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 98 of file ChartProgressMeterTest.php.
References Vendor\Package\$f, $r, and getFactory().
  100         $r = $this->getDefaultRenderer();
   102         $standard = 
$f->standard(100, 75, 80, 50);
   104         $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ProgressMeter\\Standard", $standard);
   106         $html = 
$r->render($standard);
   109             '<div class="il-chart-progressmeter-box ">' .
   110             '<div class="il-chart-progressmeter-container">' .
   111             '<svg viewBox="0 0 50 40" class="il-chart-progressmeter-viewbox">' .
   112             '<path class="il-chart-progressmeter-circle-bg" stroke-dasharray="100, 100" ' .
   113             'd="M10.4646,37.0354 q-5.858,-5.858 -5.858,-14.142 a1,1 0 1,1 40,0 q0,8.284 -5.858,14.142"></path>' .
   114             '<g class="il-chart-progressmeter-multicircle">' .
   115             '<path class="il-chart-progressmeter-circle no-success" ' .
   116             'd="M9.6514,37.8486 q-6.1948,-6.1948 -6.1948,-14.9552 a1,1 0 1,1 42.30,0 q0,8.7604 -6.1948,14.9552" ' .
   117             'stroke-dasharray="75, 100"></path>' .
   118             '<path class="il-chart-progressmeter-circle active" ' .
   119             'd="M11.2778,36.2222 q-5.5212,-5.5212 -5.5212,-13.3288 a1,1 0 1,1 37.70,0 q0,7.8076 -5.5212,13.3288" ' .
   120             'stroke-dasharray="44.4, 100"></path>' .
   122             '<g class="il-chart-progressmeter-text">' .
   123             '<text class="text-score-info" x="25" y="16"></text>' .
   124             '<text class="text-score" x="25" y="25">75 %</text>' .
   125             '<text class="text-comparision" x="25" y="31">80 %</text>' .
   126             '<text class="text-comparision-info" x="25" y="34"></text>' .
   128             '<g class="il-chart-progressmeter-needle " style="transform: rotate(86.5deg)">' .
   129             '<polygon class="il-chart-progressmeter-needle-border" points="23.5,0.1 25,2.3 26.5,0.1"></polygon>' .
   130             '<polygon class="il-chart-progressmeter-needle-fill" points="23.5,0 25,2.2 26.5,0"></polygon>' .
   136         $this->assertHTMLEquals($expected_html, $html);
 
 
 
 
The documentation for this class was generated from the following file: