assertInstanceOf('DesignPatterns\Singleton\Singleton', $firstCall); $secondCall = Singleton::getInstance(); $this->assertSame($firstCall, $secondCall); } public function testNoConstructor() { $obj = Singleton::getInstance(); $refl = new \ReflectionObject($obj); $meth = $refl->getMethod('__construct'); $this->assertTrue($meth->isPrivate()); } }