Skip to content

Commit b85f077

Browse files
committed
Do not use deprecated SnippetAcceptingContext class
1 parent 190a68c commit b85f077

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

bin/run-behat-tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ if [[ "${WP_CLI_TEST_COVERAGE}" == "true" ]] && vendor/bin/behat --help 2>/dev/n
120120
fi
121121

122122
# Run the functional tests.
123-
vendor/bin/behat --format progress "$BEHAT_TAGS" --strict "${BEHAT_EXTRA_ARGS[@]}" "$@"
123+
vendor/bin/behat --snippets-for="WP_CLI\Tests\Context\FeatureContext" --format progress "$BEHAT_TAGS" --strict "${BEHAT_EXTRA_ARGS[@]}" "$@"

src/Context/FeatureContext.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace WP_CLI\Tests\Context;
44

5-
use Behat\Behat\Context\SnippetAcceptingContext;
5+
use Behat\Behat\Context\Context;
66
use Behat\Behat\EventDispatcher\Event\OutlineTested;
77
use Behat\Behat\Hook\Scope\AfterScenarioScope;
88
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
@@ -13,15 +13,13 @@
1313
use Behat\Behat\Hook\Scope\AfterFeatureScope;
1414
use Behat\Behat\Hook\Scope\BeforeFeatureScope;
1515
use Behat\Behat\Hook\Scope\BeforeStepScope;
16-
use Behat\Testwork\Hook\Scope\HookScope;
1716
use SebastianBergmann\CodeCoverage\Report\Clover;
1817
use SebastianBergmann\CodeCoverage\Driver\Selector;
1918
use SebastianBergmann\CodeCoverage\Driver\Xdebug;
2019
use SebastianBergmann\CodeCoverage\Filter;
2120
use SebastianBergmann\CodeCoverage\CodeCoverage;
2221
use SebastianBergmann\Environment\Runtime;
2322
use RuntimeException;
24-
use WP_CLI;
2523
use DirectoryIterator;
2624
use WP_CLI\Process;
2725
use WP_CLI\ProcessRun;
@@ -33,7 +31,7 @@
3331
*
3432
* @phpstan-ignore class.implementsDeprecatedInterface
3533
*/
36-
class FeatureContext implements SnippetAcceptingContext {
34+
class FeatureContext implements Context {
3735

3836
use GivenStepDefinitions;
3937
use ThenStepDefinitions;

0 commit comments

Comments
 (0)