Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

AAA "Mantra": Arrange, Act, Assert

Premium
1:56

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 14 min)

You also get:

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