Search⌘ K
AI Features

Parsing Scenario Tags

Explore how to implement parsing of Gherkin scenario tags in Laravel by splitting tag strings, managing line references, and creating Tag objects. This lesson helps you understand handling tag lines that precede scenarios to effectively organize and parse Gherkin features within Laravel applications.

Implementation of Gherkin scenario tags

Gherkin supports adding various tags to scenarios. The code snippet below demonstrates how tags can be added to a scenario to organize them:

Feature: Feature Name

  @tagOne @tagTwo @tagThree
  Scenario: Doc String Example One
    Given a blog post named "Random" with Markdown body

Our strategy to get these lines into a list of Tag objects will ...