Skip to content

Commit f00723c

Browse files
staabmsebastianbergmann
authored andcommitted
Simplify TestCase
1 parent a4c2053 commit f00723c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Framework/TestCase.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,8 @@ private function runTest(): mixed
12951295
{
12961296
$testArguments = array_merge($this->data, array_values($this->dependencyInput));
12971297

1298-
$capture = tmpfile();
1298+
$capture = tmpfile();
1299+
assert($capture !== false);
12991300
$errorLogPrevious = ini_set('error_log', stream_get_meta_data($capture)['uri']);
13001301

13011302
try {
@@ -1330,9 +1331,7 @@ private function runTest(): mixed
13301331

13311332
return null;
13321333
} finally {
1333-
if ($capture !== false) {
1334-
fclose($capture);
1335-
}
1334+
fclose($capture);
13361335

13371336
ini_set('error_log', $errorLogPrevious);
13381337
}

0 commit comments

Comments
 (0)