public function execute(Lisphp_Scope $scope)
{
$value = null;
foreach ($this->forms as $form) {
$value = $form->evaluate($scope);
}
return $value;
}
public function testFromFile() { $testFiles = glob(__DIR__ . '/Functional/*.lisphp'); foreach ($testFiles as $file) { $code = file_get_contents($file); $scope = Lisphp_Environment::workflow(); $program = new Lisphp_Program($code); $result = $program->execute($scope); $expected = file_get_contents(preg_replace('/\\.lisphp$/', '.out', $file)); $this->assertSame(trim($expected), trim($result)); } }