[Yaml] fix for a HHVM bug

This commit is contained in:
Fabien Potencier 2014-03-04 17:04:39 +01:00
parent b3cf27a184
commit fa24749537
2 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ EOF;
} elseif (isset($test['todo']) && $test['todo']) {
// TODO
} else {
$expected = eval('return '.trim($test['php']).';');
eval('$expected = '.trim($test['php']).';');
$this->assertEquals($expected, $this->parser->parse($this->dumper->dump($expected, 10)), $test['test']);
}

View File

@ -62,9 +62,9 @@ class ParserTest extends \PHPUnit_Framework_TestCase
if (isset($test['todo']) && $test['todo']) {
// TODO
} else {
$expected = var_export(eval('return '.trim($test['php']).';'), true);
eval('$expected = '.trim($test['php']).';');
$tests[] = array($file, $expected, $test['yaml'], $test['test']);
$tests[] = array($file, var_export($expected, true), $test['yaml'], $test['test']);
}
}
}