You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently stepler uses step execution results as output provider without any processing (only json_encode in controller which is not so flexible).
What can be done is that we can add ResultCollector component, which will support custom filters for step results and so on:
class FeatureContext implements KernelAwareInterface, ResultCollectorAware
{
publicfunctionsetResultCollector(ResultCollector$results)
{
$this->results = $results;
$this->results->resultsProcessor(function ($result, array$options) {
// options can be used for configuring JMS serializer context or something like that.return$this->container->get('jms_serailizer')->serialize($result);
});
}
/** * @Givne I have registered user * @CollectResult(options={"groups": {"profile", "friends"}}) */functioniHaveRegisteredUser()
{
$user = $this->container->get('user_registrator')->registerUser();
return$user;
}
}
Also it would be nice to collect all results by default with ability to register custom filters in config...
The text was updated successfully, but these errors were encountered:
Currently stepler uses step execution results as output provider without any processing (only
json_encode
in controller which is not so flexible).What can be done is that we can add
ResultCollector
component, which will support custom filters for step results and so on:Also it would be nice to collect all results by default with ability to register custom filters in config...
The text was updated successfully, but these errors were encountered: