Maybe I missed out on a detail, but I wrote a small test case for a singleton _clone method yet it is not showing up as tested in the code coverage report.
/**
* @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.');
}
The __clone method is the usual private/final __clone() of a regular (evil) singleton.
/**
* Define __clone as final and private to dissallow cloning.
*/
private final function __clone(){}
I know it's probably overkill testing for this, but the code-coverage report is sort of the graphical representation of a job 'well done'. Is there a way to have this method marked as covered in the code coverage report?