Skip to content

Commit

Permalink
Improve wording of invalid extension behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Dec 23, 2024
1 parent 0e8020c commit 7b6e9d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion features/install-extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature: Extensions can be installed with Behat
Then the extension should have been built

Example: An extension can be built with warnings at PHP startup
Given I use the "-d extension=invalid_extension.so" PHP arguments
Given I have an invalid extension installed
When I run a command to build an extension
Then the extension should have been built

Expand Down
8 changes: 4 additions & 4 deletions test/behaviour/CliContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
namespace Php\PieBehaviourTest;

use Behat\Behat\Context\Context;
use Behat\Step\Given;
use Behat\Step\Then;
use Behat\Step\When;
use Composer\Util\Platform;
use Symfony\Component\Process\Process;
use Webmozart\Assert\Assert;

use function array_merge;
use function explode;

/** @psalm-api */
class CliContext implements Context
Expand Down Expand Up @@ -132,9 +132,9 @@ public function theExtensionShouldHaveBeenInstalled(): void
Assert::regex($this->output, '#Install complete: [-_a-zA-Z0-9/]+/example_pie_extension.so#');
}

#[When('I use the :phpArguments PHP arguments')]
public function iUsePhpArguments(string $phpArguments): void
#[Given('I have an invalid extension installed')]
public function iHaveAnInvalidExtensionInstalled(): void
{
$this->phpArguments = explode(' ', $phpArguments);
$this->phpArguments = ['-d', 'extension=invalid_extension'];
}
}

0 comments on commit 7b6e9d0

Please sign in to comment.