Exemplo n.º 1
0
 private function setupScalesDiagram(WpTesting_Model_Test $test, WpTesting_Model_Passing $passing)
 {
     if (!$test->isShowScalesDiagram()) {
         return $this;
     }
     $sorryBrowser = sprintf(__('Sorry but your browser %s is not compatible to display the chart', 'wp-testing'), $this->getUserAgent());
     $scales = $this->toJson($passing->buildScalesWithRangeOnce());
     return $this->addJsData('warningIncompatibleBrowser', $sorryBrowser)->addJsData('scales', $scales)->enqueueScript('line-diagram', array('jquery', 'raphael-scale', 'raphael-line-diagram'));
 }