Skip to content

Commit ae93815

Browse files
committed
test: cover empty request order fallback
1 parent 9d7d143 commit ae93815

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎tests/system/SuperglobalsTest.php‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,18 @@ public function testGetRequestDataRespectsOrder(): void
350350
$this->assertSame('get', $this->superglobals->getRequestData('PG')['shared']);
351351
}
352352

353+
public function testGetRequestDataEmptyOrderFallsBackToVariablesOrder(): void
354+
{
355+
$this->superglobals->setGetArray(['get' => 'value']);
356+
$this->superglobals->setPostArray(['post' => 'value']);
357+
$this->superglobals->setCookieArray(['cookie' => 'value']);
358+
359+
$this->assertSame(
360+
$this->superglobals->getRequestData((string) ini_get('variables_order')),
361+
$this->superglobals->getRequestData(''),
362+
);
363+
}
364+
353365
public function testGetRequestDataNormalizesOrderAndIgnoresDuplicates(): void
354366
{
355367
$this->superglobals->setGetArray(['shared' => 'get']);

0 commit comments

Comments
 (0)