Skip to content

Commit e56ab0a

Browse files
committed
add test for abort
1 parent 277c2d1 commit e56ab0a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/Http/Controller/CreateSecurityCookieControllerTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
$this->assertEquals('localhost', $cookie->getDomain());
99
$this->assertTrue($cookie->isHttpOnly());
1010
});
11+
12+
it('check if secret is not equal of config secret key abort 403 page', function () {
13+
config()->set('native-php.secret', 'milwad');
14+
15+
$response = $this->get('_native/api/cookie')->assertStatus(403);
16+
17+
$this->assertEquals([], $response->headers->getCookies());
18+
});

0 commit comments

Comments
 (0)