Skip to content

Commit b464a75

Browse files
committed
uses PHP 5.6 features
1 parent bb560d1 commit b464a75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Framework/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function setupColors()
7575

7676
ob_start(function ($s) {
7777
return self::$useColors ? $s : Dumper::removeColors($s);
78-
}, 1, false);
78+
}, 1, PHP_OUTPUT_HANDLER_FLUSHABLE);
7979
}
8080

8181

src/Framework/TestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function runTest($method, array $args = null)
8383
} elseif (is_array($info['throws'])) {
8484
throw new TestCaseException("Annotation @throws for {$method->getName()}() can be specified only once.");
8585
} else {
86-
$throws = preg_split('#\s+#', $info['throws'], 2) + [null, null];
86+
$throws = preg_split('#\s+#', $info['throws'], 2);
8787
}
8888

8989
$data = [];
@@ -135,7 +135,7 @@ public function runTest($method, array $args = null)
135135
if ($info['throws']) {
136136
$e = Assert::error(function () use ($method, $params) {
137137
call_user_func_array([$this, $method->getName()], $params);
138-
}, $throws[0], $throws[1]);
138+
}, ...$throws);
139139
if ($e instanceof AssertException) {
140140
throw $e;
141141
}

0 commit comments

Comments
 (0)