Permalink
Browse files

Closes #510.

  • Loading branch information...
1 parent d3dfd94 commit c146fc6c3af8eb751958d85e25b111f364d8b704 @sebastianbergmann sebastianbergmann committed Feb 27, 2012
Showing with 9 additions and 1 deletion.
  1. +1 −0 ChangeLog.markdown
  2. +8 −1 PHPUnit/Util/Class.php
View
@@ -6,6 +6,7 @@ This is the list of changes for the PHPUnit 3.6 release series.
PHPUnit 3.6.11
--------------
+* Fixed #510: PHP 5.4 `callable` type hint raises `E_NOTICE` when object is mocked.
* Fixed phpunit-selenium #72: Allow Selenium to have tests that have no concrete test methods.
PHPUnit 3.6.10
View
@@ -153,7 +153,14 @@ public static function getMethodParameters($method, $forCall = FALSE)
if (!$forCall) {
if ($parameter->isArray()) {
$typeHint = 'array ';
- } else {
+ }
+
+ else if (version_compare(PHP_VERSION, '5.4', '>') &&
+ $parameter->isCallable()) {
+ $typeHint = 'callable ';
+ }
+
+ else {
try {
$class = $parameter->getClass();
}

0 comments on commit c146fc6

Please sign in to comment.