Permalink
Browse files

Added string.

  • Loading branch information...
1 parent 9690407 commit ac133f28c0e3ee250c84a8e9cb957fc4ce62f412 @dahlia dahlia committed Dec 1, 2009
Showing with 3 additions and 0 deletions.
  1. +1 −0 Lisphp/Environment.php
  2. +2 −0 Lisphp/Test/EnvironmentTest.php
View
@@ -45,6 +45,7 @@ static function sandbox() {
$scope['*'] = new Lisphp_Runtime_Arithmetic_Multiplication;
$scope['/'] = new Lisphp_Runtime_Arithmetic_Division;
$scope['%'] = $scope['mod'] =new Lisphp_Runtime_Arithmetic_Modulus;
+ $scope['string'] = new Lisphp_Runtime_PHPFunction('strval');
$scope['.'] = $scope['concat'] =new Lisphp_Runtime_String_Concat;
$scope['string-join'] = new Lisphp_Runtime_String_StringJoin;
$scope['substring'] = new Lisphp_Runtime_PHPFunction('substr');
@@ -66,6 +66,8 @@ function testSandbox($scope = null) {
$this->assertType('Lisphp_Runtime_Arithmetic_Division', $scope['/']);
$this->assertType('Lisphp_Runtime_Arithmetic_Modulus', $scope['%']);
$this->assertType('Lisphp_Runtime_Arithmetic_Modulus', $scope['mod']);
+ $this->assertType('Lisphp_Runtime_PHPFunction', $scope['string']);
+ $this->assertEquals('strval', $scope['string']->callback);
$this->assertType('Lisphp_Runtime_String_Concat', $scope['.']);
$this->assertType('Lisphp_Runtime_String_Concat', $scope['concat']);
$this->assertType('Lisphp_Runtime_String_StringJoin',

0 comments on commit ac133f2

Please sign in to comment.