Get bare Behat scenario running
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Feature: Injecting parameters into context
|
||||
|
||||
Background:
|
||||
Given a working Symfony application with SymfonyExtension configured
|
||||
Given a context file "features/bootstrap/FeatureContext.php" containing:
|
||||
"""
|
||||
<?php
|
||||
@@ -28,7 +29,15 @@ Feature: Injecting parameters into context
|
||||
}
|
||||
}
|
||||
"""
|
||||
And an application kernel injecting a parameter into the FeatureContext class
|
||||
And an application kernel configured for SymfonyExtension with YAML services file containing:
|
||||
"""
|
||||
services:
|
||||
FeatureContext:
|
||||
class: FeatureContext
|
||||
public: true
|
||||
arguments:
|
||||
- "%kernel.environment%"
|
||||
"""
|
||||
And a Behat configuration with the minimal working configuration for SymfonyExtension
|
||||
And a Behat configuration with the minimal working configuration for MinkExtension
|
||||
|
||||
|
||||
@@ -1,9 +1,33 @@
|
||||
Feature: Running bare Behat scenarios
|
||||
|
||||
Scenario: Running Behat with SymfonyExtension
|
||||
Given a Behat configuration with the minimal working configuration for SymfonyExtension
|
||||
And a Behat configuration with the minimal working configuration for MinkExtension
|
||||
And an application kernel with the minimal working configuration for SymfonyExtension
|
||||
And a feature file with passing scenario
|
||||
Given a working Symfony application with SymfonyExtension configured
|
||||
And a Behat configuration containing:
|
||||
"""
|
||||
default:
|
||||
suites:
|
||||
default:
|
||||
contexts:
|
||||
- App\Tests\SomeContext
|
||||
"""
|
||||
And a feature file containing:
|
||||
"""
|
||||
Feature:
|
||||
Scenario:
|
||||
Then it should pass
|
||||
"""
|
||||
And a context file "tests/SomeContext.php" containing:
|
||||
"""
|
||||
<?php
|
||||
|
||||
namespace App\Tests;
|
||||
|
||||
use Behat\Behat\Context\Context;
|
||||
|
||||
final class SomeContext implements Context {
|
||||
/** @Then it should pass */
|
||||
public function itShouldPass(): void {}
|
||||
}
|
||||
"""
|
||||
When I run Behat
|
||||
Then it should pass
|
||||
|
||||
Reference in New Issue
Block a user