Skip to content
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

Merged
merged 16 commits into from
Feb 12, 2015
Merged

1st draft for testing API #1070

merged 16 commits into from
Feb 12, 2015

Conversation

nicosomb
Copy link
Member

No description provided.

@nicosomb nicosomb mentioned this pull request Feb 10, 2015
@nicosomb nicosomb changed the title [v2] Test for GET on empty database [wip] Test for GET on empty database Feb 10, 2015
@j0k3r j0k3r added this to the 2.0 milestone Feb 10, 2015
@nicosomb nicosomb changed the title [wip] Test for GET on empty database [wip] 1st draft for testing API Feb 10, 2015
@nicosomb
Copy link
Member Author

@j0k3r
Copy link
Member

j0k3r commented Feb 10, 2015

I think you need to rebase it against the v2 branch. Good job BTW :)

@nicosomb
Copy link
Member Author

Merge done.

PR still in WIP.

@j0k3r
Copy link
Member

j0k3r commented Feb 11, 2015

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.

@@ -33,7 +33,7 @@ public function getSaltAction($username)
throw $this->createNotFoundException();
}

return $user->getSalt();
return array($user->getSalt());
Copy link
Member

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

@j0k3r
Copy link
Member

j0k3r commented Feb 11, 2015

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 ..

@nicosomb
Copy link
Member Author

I added a test with bad headers.

I have to change my test for this comment :

You can check that the json response contains more than one element (entry)

@nicosomb nicosomb changed the title [wip] 1st draft for testing API 1st draft for testing API Feb 11, 2015
@nicosomb
Copy link
Member Author

ready for review.


$this->assertEquals(200, $client->getResponse()->getStatusCode());

/* var_dump(count(json_decode($client->getResponse()->getContent())));
Copy link
Member

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 :)

j0k3r added a commit that referenced this pull request Feb 12, 2015
@j0k3r j0k3r merged commit 2f6a596 into v2 Feb 12, 2015
@j0k3r j0k3r deleted the v2-api-tests branch February 12, 2015 07:50
@nicosomb nicosomb modified the milestones: 2.0, 2.0.0-alpha Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants