aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
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()