not->toBeFalse() ->and($loop)->not->toBeFalse() ->and($guard)->toBeLessThan($loop); // the guard body itself must return 405 and terminate, not merely exist $body = substr($source, $guard, $loop - $guard); expect($body)->toContain('http_response_code(405)') ->and($body)->toContain('exit;'); });