Skip to main content

AAA "Mantra": Arrange, Act, Assert

Premium
1:56

The Full Lesson is Only for Premium Members

Want to access all of our courses? (30 h 41 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

V
Vadim ✓ Link copied!

Homepage of my site has many things: newest products, latest blog articles, teams, and few other things. Would it be right to have homepageTest.php file with one test method test_homepage_contains_all_content(), that includes:

  • assertStatus(200);
  • assertSee(products)
  • assertSee(articles)
  • assertSee(etc...)
  • ...

or it better to have separate test methods for each section of the page?

PK
Povilas Korop ✓ Link copied!

As in many situations you asked for earlier, it's your personal preference :)

CO
Cristhian Ortega ✓ Link copied!

Copy that: AAA stands for Arrange, Act, and Assert.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.