/** * Transform a metric to a metric name. * * @param Metric|null $metric * * @return string */ public function transform($metric) { if (null === $metric) { return; } return $metric->getName(); }
public function testSetName() { $metric = new Metric(); $metric->setName('memory'); $this->tester->assertEquals('memory', $metric->getName(), 'Metric::setName failed!'); }