aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-11 15:35:40 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-11 15:35:40 +0100
commit9ca5fd43f9cd3dbf00511748492298aaf3145575 (patch)
treea1b77ca2c0471aefe8b7515ca832c7554ab107b1 /src
parentf170f315941b461a2bcd85843583baedbc48efd2 (diff)
downloadwallabag-9ca5fd43f9cd3dbf00511748492298aaf3145575.tar.gz
wallabag-9ca5fd43f9cd3dbf00511748492298aaf3145575.tar.zst
wallabag-9ca5fd43f9cd3dbf00511748492298aaf3145575.zip
test with bad headers
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
index 815903fa..b4831167 100644
--- a/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php
@@ -67,6 +67,15 @@ class WallabagRestControllerTest extends WallabagTestCase
67 'application/json' 67 'application/json'
68 ) 68 )
69 ); 69 );
70
71 // Now testing with bad headers
72 $badHeaders = array(
73 'HTTP_AUTHORIZATION' => 'Authorization profile="UsernameToken"',
74 'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="admin", PasswordDigest="Wr0ngDig3st", Nonce="n0Nc3", Created="2015-01-01T13:37:00Z"',
75 );
76
77 $client->request('GET', '/api/entries/'.$entry->getId().'.json', array(), array(), $badHeaders);
78 $this->assertEquals(403, $client->getResponse()->getStatusCode());
70 } 79 }
71 80
72 public function testGetEntries() 81 public function testGetEntries()