User: peter Date: 19/02/16 Time: 16:39.
Inheritance: extends Report, implements ReportInterface
 /**
  * Test the configuration for the graph.
  */
 public function testConfig()
 {
     $report = new CataractComplicationsReport(Yii::app());
     $config = $report->graphConfig();
     $configDecoded = json_decode($config, true);
     $this->assertInternalType('string', $config);
     //is a string
     $this->assertEquals('bar', $configDecoded['chart']['type']);
     // check it looks ok
     $this->assertEquals(false, $configDecoded['credits']['enabled']);
     //check globabl config merge
     $this->assertEquals('CataractComplicationsReport', $configDecoded['chart']['renderTo']);
 }
Exemplo n.º 2
0
 public function actionCataractComplicationTotal()
 {
     $reportObj = new CataractComplicationsReport(Yii::app());
     $this->renderJSON(array($reportObj->getTotalComplications(), $reportObj->getTotalOperations()));
 }