From 2ef9471af629f44a658217cfa79a074395d171d1 Mon Sep 17 00:00:00 2001 From: Oleg Baturin Date: Sat, 23 Nov 2024 19:15:20 +0700 Subject: [PATCH] update tests --- tests/framework/web/RequestTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/framework/web/RequestTest.php b/tests/framework/web/RequestTest.php index c6673c2bf5f..1c29c4ed200 100644 --- a/tests/framework/web/RequestTest.php +++ b/tests/framework/web/RequestTest.php @@ -319,6 +319,16 @@ public function testCustomUnsafeMethodsCsrfHeaderValidation() } } + public function testNoCsrfTokenCsrfHeaderValidation() + { + $this->mockWebApplication(); + + $request = new Request(); + $request->validateCsrfHeaderOnly = true; + + $this->assertEquals($request->getCsrfToken(), null); + } + public function testResolve() { $this->mockWebApplication([