Time: 00:03.858, Memory: 10.00 MB

OK (1 test, 1 assertion)

An inbox has an and an property. We will use them to sign up a user.

Signing up a user

We can sign up a user by loading the playground app and submitting the email address and a test password:

test authentication

Wait for confirmation and extract code

Next we can wait for the user to receive a confirmation email and parse the verification code from the body:

code

Confirm the user

Once extracted we can use the code to confirm the user.

code

Login and see a welcome

After successfully confirming a user we can login and see a picture of a happy dog. Let's do that:

codeception example test

Running the tests

By running we should see an automated sign up and confirmation

Conclusion

Codeception is a powerful framework for writing end-to-end acceptance tests in PHP. It used with Laravel, Symfony, Wordpress and many other application. By combining Codeception with MailSlurp we can test applications using real email addresses. As you can see in the example above we were able to create real email accounts for each test user and receive confirmation codes. Use MailSlurp and Codeception today to test your own application. Sign up now.