public function testAddFunction() { $graphite = $this->mockFactory->getGraphiteClientMock(); $target = new Target($graphite, 'test.target', array(), array()); $graphite->expects($this->once())->method('getData')->with('test.target', array('keepLastValue' => true, 'scale' => 10)); $target->fcn('keepLastValue', true)->fcn('scale', 10); $target->data(); }