public function _testRegistryExceptionClassNotFound() { try { $fail_class = 'classdoesnotexist'; $registry = @Registry::setClassName($fail_class); $this->fail('Expected exception, because we cannot initialize the registry using a non-existent class.'); } catch (ErrorException $e) { $this->assertContains($fail_class, $e->getMessage()); } }