Esempio n. 1
0
 /**
  * This method tests the "toFloat" method.
  */
 public function test_toFloat()
 {
     $x = IBool\Type::true();
     $y = IBool\Type::false();
     $z = IBool\Module::toFloat($x);
     $this->assertInstanceOf('\\Saber\\Data\\IFloat\\Type', $z);
     $this->assertSame(1.0, $z->unbox());
     $z = IBool\Module::toFloat($y);
     $this->assertInstanceOf('\\Saber\\Data\\IFloat\\Type', $z);
     $this->assertSame(0.0, $z->unbox());
 }