상속: extends Tokenizer
예제 #1
0
파일: CastTest.php 프로젝트: NumbDai/zephir
 public function testObjectCast()
 {
     $t = new Cast();
     $this->assertEquals((object) 5, $t->testObjectCastFromInt());
     $this->assertEquals((object) 5.0, $t->testObjectCastFromFloat());
     $this->assertEquals((object) false, $t->testObjectCastFromFalse());
     $this->assertEquals((object) true, $t->testObjectCastFromTrue());
     $this->assertEquals((object) null, $t->testObjectCastFromNull());
     $this->assertEquals((object) array(), $t->testObjectCastFromEmptyArray());
     $this->assertEquals((object) array(1, 2, 3, 4), $t->testObjectCastFromArray());
     $this->assertEquals((object) "", $t->testObjectCastFromEmptyString());
     $this->assertEquals((object) "test string", $t->testObjectCastFromString());
 }