如果我使用Behat步骤创建定义,则不会显示该功能中的步骤结果。我想显示所有步骤的结果,而不仅仅是调用步骤。
例如:
以下代码仅显示
'Given I do something with "this"'
但我也希望看到
'When I search for "this"'
'Then I should see "this"'
特征/ dosomething.feature
Feature: Do something
In order to do something
As an admin user
I need to do something
@api
Scenario: Do something
Given I do something with "this"
特征/引导/ FeatureContext.php
/**
* @When /^I do something with "([^"]*)"$/
*/
public function iDoSomethingWith($something) {
$steps = array();
$steps[] = new When('I search for "'. $something . '"');
$steps[] = new Then('I should see "' . $something . '"');
return($steps);
}