mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-10 17:05:26 +00:00
test with bad headers
This commit is contained in:
parent
f170f31594
commit
9ca5fd43f9
1 changed files with 9 additions and 0 deletions
|
@ -67,6 +67,15 @@ class WallabagRestControllerTest extends WallabagTestCase
|
|||
'application/json'
|
||||
)
|
||||
);
|
||||
|
||||
// Now testing with bad headers
|
||||
$badHeaders = array(
|
||||
'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
|
||||
'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="admin", PasswordDigest="Wr0ngDig3st", Nonce="n0Nc3", Created="2015-01-01T13:37:00Z"',
|
||||
);
|
||||
|
||||
$client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $badHeaders);
|
||||
$this->assertEquals(403, $client->getResponse()->getStatusCode());
|
||||
}
|
||||
|
||||
public function testGetEntries()
|
||||
|
|
Loading…
Reference in a new issue