2017 © Pedro Peláez
 

library behat-parser

image

haringsrob/behat-parser

  • Monday, May 29, 2017
  • by harings_rob
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

BehatParser

A simple library for parsing and searching in Behat contexts., (*1)

The intention of this library is to create autocomplete functions within the php language server using the language server protocol developer by Microsoft., (*2)

However, this could be usefull in other scenario's as well., (*3)

Example

To fetch the step defenitions for a given class:, (*4)

$behat_parser_library = new Parser();
$class = \tests\FeatureContext::class;
$behat_parser_library->readClassForStepDefinitions($class);
$available_steps = $behat_parser_library->getAllStepDefinitions();

You can also use an array of classes:, (*5)

$behat_parser_library = new Parser();
$classes = [
  \tests\FeatureContext::class,
  \tests\CustomContext::class,
];
$behat_parser_library->readClassesForStepDefinitions($class);
$available_steps = $behat_parser_library->getAllStepDefinitions();

Then you can invoke the matcher to search for specific steps:, (*6)

$behat_parser_matcher = new Matcher($behat_parser_library);
$matching_result = $behat_parser_matcher->findStepContaining('I am using');

The Versions

29/05 2017

dev-master

9999999-dev http://www.example.org/

  Sources   Download

The Requires

  • php 7.1.*

 

The Development Requires