Writing a scenario for the about page

A scenario is basically a possible situation where features can act upon. This means that each feature can have many scenarios. Consider the about page that we created in Chapter 2, The Request and Response Life Cycle. When you visit /about, you see a general about page. When you visit /about/{name}, there are two possible scenarios: if {name} exists, you see their about page and if it doesn't, you see an error page. So we have three possible scenarios for the /about page. Let's add them to our feature and see how it looks:

Feature: about page
  In order to see about page contents
  As a user
  I am able to visit about page

  Scenario: Visiting about page Given I am on "/about" Then I should see "mava is a web app" ...

Get Mastering Symfony now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.