Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @covers ErrorHandling::__clone
- */
- public function test__cloneNotCloneable(){
- $class = new ReflectionClass('ErrorHandling');
- $method = $class->getMethod('__clone');
- self::assertTrue($method->isFinal(), '__clone method is not final.');
- self::assertTrue($method->isPrivate(), '__clone method is not private.');
- }
- /**
- * Define __clone as final and private to dissallow cloning.
- */
- private final function __clone(){}
- // @codeCoverageIgnoreStart
- private function __clone() { }
- // @codeCoverageIgnoreEnd
Add Comment
Please, Sign In to add comment