test with bad headers

This commit is contained in:
Nicolas Lœuillet 2015-02-11 15:35:40 +01:00
parent f170f31594
commit 9ca5fd43f9

View file

@ -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()