示例#1
0
 public function testBooleanCast()
 {
     $t = new Cast();
     $this->assertTrue($t->testBooleanCastFromIntTrue1() === true);
     $this->assertTrue($t->testBooleanCastFromIntTrue2() === true);
     $this->assertTrue($t->testBooleanCastFromIntFalse() === false);
     $this->assertTrue($t->testBooleanCastFromObject() === true);
     $this->assertTrue($t->testBooleanCastFromEmptyArray() === false);
     $this->assertTrue($t->testBooleanCastFromArray() === true);
     $this->assertTrue($t->testBooleanCastFromNull() === false);
 }