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

Add unit test for the EventStorageService #18

Merged
merged 9 commits into from
Dec 4, 2018
Merged

Conversation

WengerK
Copy link
Collaborator

@WengerK WengerK commented Nov 29, 2018

Here some basic tests.

They serve as Example for futur tests or as "code" example for developers which discover the module.
As I always say, people should read the tests to understand the module - thoses tests should help them - especially Units ones.

We still have to works on heavy tests (and more valuable for the module stability himself) as:

But let's merge first this in dev & then works separately on each other cases

@WengerK WengerK requested a review from wanze November 29, 2018 10:19
Remove shipping as uncomplete tests, should be added in complete separated tests/PR.
Remove coupon as uncomplete tests, should be added in complete separated tests/PR.
@WengerK WengerK changed the title Init kernel tests Add unit test for the EventStorageService Nov 29, 2018
* Asserts the events queue follows the FIFO (First in First out) pattern.
*/
public function testAddEventFifoQueue() {
$this->testAddEvent();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
$this->testAddEvent();

useless

* Asserts strictly same event aren't added twice in the events queue.
*/
public function testAddEventSameSkipped() {
$this->testAddEvent();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
$this->testAddEvent();

useless

Copy link
Contributor

@wanze wanze left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good! Please merge, I hope you have enough permissions - otherwise let me know :)

@WengerK WengerK merged commit 3e2bc12 into 8.x-1.x Dec 4, 2018
@WengerK WengerK deleted the init-kernel-tests branch December 4, 2018 08:17
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.

2 participants