Skip to content

Commit 4aa1c52

Browse files
Add fallback for PHPUnit_Framework_TestCase objects.
1 parent 3684098 commit 4aa1c52

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

PHP/CodeCoverage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ public function append(array $data, $id = NULL)
212212
}
213213
}
214214

215+
if (is_object($id) && $this->storageType == self::STORAGE_ARRAY) {
216+
if ($id instanceof PHPUnit_Framework_TestCase) {
217+
$id = get_class($id) . '::' . $id->getName();
218+
}
219+
}
220+
215221
$this->data[$id] = array(
216222
'executed' => $this->getLinesByStatus($data, 1),
217223
'dead' => $dead,

0 commit comments

Comments
 (0)