Skip to content

Add tests for notification by id #490

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

Merged
merged 6 commits into from
Dec 21, 2016
Merged

Add tests for notification by id #490

merged 6 commits into from
Dec 21, 2016

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Dec 21, 2016

Add tests for #489

@@ -96,6 +96,16 @@ public function shouldMarkNotificationsAsReadForGivenDate()

$api->markRead($since);
}
public function shouldGetNotification()
{
$id = id;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I get a ramdom id there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mt_rand(1, time()); 

:)

@m1guelpf
Copy link
Contributor Author

@sergeyklay Would this work?

Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just have some minor comments.

public function shouldGetNotification()
{
$id = mt_rand(1, time());
;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra semicolon.

@@ -96,6 +96,17 @@ public function shouldMarkNotificationsAsReadForGivenDate()

$api->markRead($since);
}
public function shouldGetNotification()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add blank line between functions

@m1guelpf
Copy link
Contributor Author

@Nyholm Done

@Nyholm
Copy link
Collaborator

Nyholm commented Dec 21, 2016

Awesome. Thanks!

@Nyholm Nyholm merged commit 39118bd into KnpLabs:master Dec 21, 2016
@m1guelpf m1guelpf mentioned this pull request Dec 21, 2016
@m1guelpf m1guelpf mentioned this pull request Jan 11, 2017
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.

3 participants