Example #1
0
 /**
  * @Transform :chart
  * @Transform /^(spline)$/
  */
 public function castChartNameToObject($name)
 {
     $image = $this->fixturesGenerator->createEmptyImage();
     switch ($name) {
         case 'spline':
             $this->fixturesGenerator->setSplineData($image);
             break;
     }
     return $image;
 }
Example #2
0
<?php

/**
 * Simple chart stroking to check if the functionality itself works
 */
require __DIR__ . '/../../../vendor/autoload.php';
use CpChart\Behat\Fixtures\FixtureGenerator;
$generator = new FixtureGenerator();
$image = $generator->createEmptyImage();
$generator->setSplineData($image);
$image->stroke();