Inheritance: extends Tokenizer
Exemple #1
0
 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());
 }