Eris\ExampleEnd2EndTest::testReproducibilityWithSeed PHP Method

testReproducibilityWithSeed() public method

    public function testReproducibilityWithSeed()
    {
        $this->runExample('AlwaysFailsTest.php');
        $result = $this->results->testsuite->testcase;
        $output = (string) $result->{"system-out"};
        if (!preg_match('/ERIS_SEED=([0-9]+)/', $output, $matches)) {
            $this->fail("Cannot find ERIS_SEED in output to rerun the test deterministically: " . var_export($output, true));
        }
        $this->setEnvironmentVariable('ERIS_SEED', $matches[1]);
        $this->runExample('AlwaysFailsTest.php');
        $secondRunResult = $this->results->testsuite->testcase;
        $this->assertEquals($result->failure, $secondRunResult->failure);
    }