From 3ddc65b2ae75880d26ef15223ba04436b56162c9 Mon Sep 17 00:00:00 2001 From: Andrew Nagy Date: Thu, 7 Apr 2022 19:08:23 +0000 Subject: [PATCH] fixes codeception to actually work --- tests/Support/Module.php | 13 +++++++------ tests/acceptance/EloquentBuilderTypes.feature | 2 +- tests/acceptance/EloquentCollectionTypes.feature | 2 +- tests/acceptance/ExceptionHandler.feature | 2 +- tests/acceptance/RedirectReturnType.feature | 4 ++-- tests/acceptance/UrlReturnType.feature | 4 ++-- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/Support/Module.php b/tests/Support/Module.php index 0780832..cf59aa5 100644 --- a/tests/Support/Module.php +++ b/tests/Support/Module.php @@ -13,6 +13,7 @@ use Composer\Semver\Semver; use Composer\Semver\VersionParser; use PackageVersions\Versions; use PHPUnit\Framework\Assert; +use Behat\Gherkin\Node\PyStringNode; use Behat\Gherkin\Node\TableNode; use OutOfBoundsException; use PHPUnit\Framework\SkippedTestError; @@ -238,9 +239,9 @@ class Module extends BaseModule /** * @Given I have the following code preamble :code */ - public function haveTheFollowingCodePreamble(string $code): void + public function haveTheFollowingCodePreamble(PyStringNode $code): void { - $this->preamble = $code; + $this->preamble = $code->getRaw(); } /** @@ -313,20 +314,20 @@ class Module extends BaseModule /** * @Given I have the following config :config */ - public function haveTheFollowingConfig(string $config): void + public function haveTheFollowingConfig(PyStringNode $config): void { - $this->psalmConfig = $config; + $this->psalmConfig = $config->getRaw(); } /** * @Given I have the following code :code */ - public function haveTheFollowingCode(string $code): void + public function haveTheFollowingCode(PyStringNode $code): void { $file = sprintf( '%s/%s.php', rtrim($this->config['default_dir'], '/'), - sha1($this->preamble . $code) + sha1($this->preamble . $code->getRaw()) ); $this->fs()->writeToFile( diff --git a/tests/acceptance/EloquentBuilderTypes.feature b/tests/acceptance/EloquentBuilderTypes.feature index fc3220f..96cc96f 100644 --- a/tests/acceptance/EloquentBuilderTypes.feature +++ b/tests/acceptance/EloquentBuilderTypes.feature @@ -132,7 +132,7 @@ Feature: Eloquent Builder types When I run Psalm Then I see no errors - Scenario: + Scenario: Unknown Scenario Given I have the following code preamble """ """ - Scenario: + Scenario: Unknown Scenario Given I have the following code """ """ - Scenario: + Scenario: Unknown Scenario Given I have the following code """ """ - Scenario: + Scenario: Unknown Scenario Given I have the following code """ """ - Scenario: + Scenario: Unknown Scenario Given I have the following code """