Permalink
Browse files

Remove workarounds for PHP < 5.4.

  • Loading branch information...
1 parent 3856371 commit 75c8e2c1c560be8c024024f89d38919e6c01988e @sebastianbergmann committed Sep 19, 2012
Showing with 2 additions and 12 deletions.
  1. +1 −2 PHPUnit/Util/Class.php
  2. +1 −5 PHPUnit/Util/Log/JSON.php
  3. +0 −5 Tests/TextUI/log-json.phpt
View
@@ -154,8 +154,7 @@ public static function getMethodParameters($method, $forCall = FALSE)
$typeHint = 'array ';
}
- else if (version_compare(PHP_VERSION, '5.4', '>') &&
- $parameter->isCallable()) {
+ else if ($parameter->isCallable()) {
$typeHint = 'callable ';
}
@@ -246,10 +246,6 @@ protected function writeCase($status, $time, array $trace = array(), $message =
*/
public function write($buffer)
{
- if (defined('JSON_PRETTY_PRINT')) {
- parent::write(json_encode($buffer, JSON_PRETTY_PRINT));
- } else {
- parent::write(json_encode($buffer));
- }
+ parent::write(json_encode($buffer, JSON_PRETTY_PRINT));
}
}
@@ -1,10 +1,5 @@
--TEST--
phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php
---SKIPIF--
-<?php
-if (!defined("JSON_PRETTY_PRINT")) {
- echo "Skip: Test requires JSON_PRETTY_PRINT / PHP >= 5.4";
-}
--FILE--
<?php
define('PHPUNIT_TESTSUITE', TRUE);

0 comments on commit 75c8e2c

Please sign in to comment.