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