Skip to content

Commit 08cfc00

Browse files
committed
clarity
1 parent 835d907 commit 08cfc00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/phpunit-bootstrap.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,18 @@ function http_post(string $phpfile, array $post_data): void
8181
$_SERVER["PHP_SELF"] = preg_replace("/.*webroot\//", "/", $phpfile);
8282
$_POST = $post_data;
8383
ob_start();
84-
$post_did_redirect = false;
84+
$post_did_redirect_or_die = false;
8585
try {
8686
include $phpfile;
8787
} catch (UnityWebPortal\lib\exceptions\PhpUnitNoDieException $e) {
88-
$post_did_redirect = true;
88+
$post_did_redirect_or_die = true;
8989
} finally {
9090
ob_get_clean(); // discard output
9191
unset($_POST);
9292
$_SERVER = $_PREVIOUS_SERVER;
9393
}
94-
assert($post_did_redirect, "post did not redirect!");
94+
// https://en.wikipedia.org/wiki/Post/Redirect/Get
95+
assert($post_did_redirect_or_die, "post did not redirect or die!");
9596
}
9697

9798
function http_get(string $phpfile, array $get_data = array()): void

0 commit comments

Comments
 (0)