/** * This method tests the "toInt32" method. */ public function test_toInt32() { $x = IBool\Type::true(); $y = IBool\Type::false(); $z = IBool\Module::toInt32($x); $this->assertInstanceOf('\\Saber\\Data\\IInt32\\Type', $z); $this->assertSame(1, $z->unbox()); $z = IBool\Module::toInt32($y); $this->assertInstanceOf('\\Saber\\Data\\IInt32\\Type', $z); $this->assertSame(0, $z->unbox()); }