Skip to content

Commit b1dcada

Browse files
committed
ensure old XmlHttpRequest keep working
1 parent c7e7c84 commit b1dcada

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/Middleware/MezzioSpec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364
);
365365

366366
$request = $this->request;
367-
$request = $request->withHeader('X-Requested-With', 'XMLHttpRequest');
367+
$request = $request->withHeader('X-Requested-With', rand(0, 1) ? 'XMLHttpRequest' : 'XmlHttpRequest');
368368

369369
$handler = Double::instance(['implements' => RequestHandlerInterface::class]);
370370
allow($handler)->toReceive('handle')->with($request)->andRun(function (): never {

0 commit comments

Comments
 (0)