public function testFrom() { $from = new Lisphp_Runtime_From(); $env = Lisphp_Environment::sandbox(); $scope = new Lisphp_Scope($env); $values = $from->apply($scope, self::lst('Foo (<Bar> <Baz>)')); $this->assertEquals('Foo\\Bar', $values[0]->class->getName()); $this->assertEquals('Foo\\Bar', $scope['<Bar>']->class->getName()); $this->assertEquals('Foo\\Baz', $values[1]->class->getName()); $this->assertEquals('Foo\\Baz', $scope['<Baz>']->class->getName()); }
function testFrom() { $from = new Lisphp_Runtime_From(); $env = Lisphp_Environment::sandbox(); $scope = new Lisphp_Scope($env); $values = $from->apply($scope, self::lst('Lisphp (<Symbol> <Program>)')); $this->assertEquals('Lisphp_Symbol', $values[0]->class->getName()); $this->assertEquals('Lisphp_Symbol', $scope['<Symbol>']->class->getName()); $this->assertEquals('Lisphp_Program', $values[1]->class->getName()); $this->assertEquals('Lisphp_Program', $scope['<Program>']->class->getName()); }