apply() public method

public apply ( Lisphp_Scope $scope, Lisphp_List $arguments )
$scope Lisphp_Scope
$arguments Lisphp_List
Esempio n. 1
0
 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());
 }
Esempio n. 2
0
 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());
 }