-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1st draft for testing API #1070
Conversation
here is my 1st test, need refactor, I know it: https://github.com/wallabag/wallabag/blob/v2-api-tests/src/Wallabag/CoreBundle/Tests/Controller/WallabagRestControllerTest.php |
I think you need to rebase it against the |
9feb38e
to
2725de8
Compare
Merge done. PR still in WIP. |
Well, for readability, can you separate the commit where you remove the doc from this PR ? The diff is inreadable 😕 Also, you can remove the doc directly from the v2 branch, you don't need to create a PR for that. |
9386185
to
c9fa967
Compare
@@ -33,7 +33,7 @@ public function getSaltAction($username) | |||
throw $this->createNotFoundException(); | |||
} | |||
|
|||
return $user->getSalt(); | |||
return array($user->getSalt()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to update the phpDoc then
Could you add some tests where headers are completely fucked up? Like : 'PHP_AUTH_USER' => 'little_poney',
'HTTP_AUTHORIZATION' => 'Authorization profile="NothinRelatedToken"',
'HTTP_x-wsse' => 'X-WSSE: UsernameToken Username="'.$username.'", HackingDigest="'.$digest.'", Nonce="'.$nonce.'", Created="'.$created.'"', Etc .. |
I added a test with bad headers. I have to change my test for this comment :
|
ready for review. |
|
||
$this->assertEquals(200, $client->getResponse()->getStatusCode()); | ||
|
||
/* var_dump(count(json_decode($client->getResponse()->getContent()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can remove this debug :)
No description provided.