getResult() public method

Return the result of the given class, throw an exception if it does not exist.
public getResult ( string $class ) : PhpBench\Model\ResultInterface
$class string
return PhpBench\Model\ResultInterface
 /**
  * It can have results added in the constructor.
  */
 public function testAddConstructor()
 {
     $collection = new ResultCollection([$expected = new TimeResult(10)]);
     $result = $collection->getResult(TimeResult::class);
     $this->assertSame($expected, $result);
 }