PhpBench\Tests\Unit\Benchmark\VariantTest::testExceptionAwareness PHP Method

testExceptionAwareness() public method

It should be aware of exceptions.
    public function testExceptionAwareness()
    {
        $variant = new Variant($this->subject->reveal(), $this->parameterSet->reveal(), 10, 20);
        $error = new \Exception('Test');
        $this->assertFalse($variant->hasErrorStack());
        $variant->setException($error);
        $this->assertTrue($variant->hasErrorStack());
        $this->assertEquals('Test', $variant->getErrorStack()->getTop()->getMessage());
    }