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? (36 h 00 min)

You also get:

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

Already a member? Login here

Vadim avatar

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?

Povilas Korop avatar

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

Cristhian Ortega avatar

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

👍 1

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.