/** * This method tests the "singletons" methods. */ public function test_singletons() { $p0 = IInteger\Type::negative(); $e0 = IInteger\Type::negative(); $this->assertInstanceOf('\\Saber\\Data\\IInteger\\Type', $p0); $this->assertSame($e0->__hashCode(), $p0->__hashCode()); $p1 = $p0->unbox(); $e1 = '-1'; $this->assertInternalType('string', $p1); $this->assertSame($e1, $p1); $p2 = IInteger\Type::zero(); $e2 = IInteger\Type::zero(); $this->assertInstanceOf('\\Saber\\Data\\IInteger\\Type', $p2); $this->assertSame($e2->__hashCode(), $p2->__hashCode()); $p3 = $p2->unbox(); $e3 = '0'; $this->assertInternalType('string', $p3); $this->assertSame($e3, $p3); $p4 = IInteger\Type::one(); $e4 = IInteger\Type::one(); $this->assertInstanceOf('\\Saber\\Data\\IInteger\\Type', $p4); $this->assertSame($e4->__hashCode(), $p4->__hashCode()); $p5 = $p4->unbox(); $e5 = '1'; $this->assertInternalType('string', $p5); $this->assertSame($e5, $p5); }