Skip to content

Commit

Permalink
FRW-172 Upgrade to Codeception 5 (#9542)
Browse files Browse the repository at this point in the history
FRW-172 Codeception Upgrade to latest version
  • Loading branch information
geega authored Nov 9, 2022
1 parent d8cce6d commit 541622f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include:

paths:
tests: tests
log: tests/_output
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
Expand Down
4 changes: 2 additions & 2 deletions tests/SprykerTest/Shared/Router/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ paths:
tests: .
data: ../../../_data
support: _support
log: ../../../_output
output: ../../../_output

coverage:
enabled: true
Expand All @@ -14,7 +14,7 @@ coverage:
suites:
Shared:
path: .
class_name: RouterTester
actor: RouterTester
modules:
enabled:
- Asserts
Expand Down
4 changes: 2 additions & 2 deletions tests/SprykerTest/Yves/Router/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ paths:
tests: .
data: ../../../_data
support: _support
log: ../../../_output
output: ../../../_output

coverage:
enabled: true
Expand All @@ -14,7 +14,7 @@ coverage:
suites:
Yves:
path: .
class_name: RouterYvesTester
actor: RouterYvesTester
modules:
enabled:
- Asserts
Expand Down
19 changes: 12 additions & 7 deletions tests/SprykerTest/Zed/Router/_support/Helper/RouterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface;
use SprykerTest\Service\Container\Helper\ContainerHelperTrait;
use SprykerTest\Shared\Testify\Helper\ConfigHelperTrait;
use SprykerTest\Shared\Testify\Helper\ModuleHelperConfigTrait;
use SprykerTest\Zed\Application\Helper\ApplicationHelperTrait;
use SprykerTest\Zed\EventDispatcher\Helper\EventDispatcherHelperTrait;
use SprykerTest\Zed\Testify\Helper\Business\BusinessHelperTrait;
Expand All @@ -41,6 +42,7 @@ class RouterHelper extends Module
use DependencyProviderHelperTrait;
use EventDispatcherHelperTrait;
use ContainerHelperTrait;
use ModuleHelperConfigTrait;

/**
* @var string
Expand All @@ -57,13 +59,6 @@ class RouterHelper extends Module
*/
protected $routerPlugins = [];

/**
* @var array<string, mixed>
*/
protected $config = [
self::CONFIG_KEY_ROUTER_PLUGINS => [],
];

/**
* @uses \Spryker\Zed\Router\Communication\Plugin\Application\RouterApplicationPlugin::SERVICE_ROUTER
*
Expand Down Expand Up @@ -103,6 +98,16 @@ public function _initialize(): void
Request::setFactory($requestFactory);
}

/**
* @return void
*/
protected function setDefaultConfig(): void
{
$this->config = [
static::CONFIG_KEY_ROUTER_PLUGINS => [],
];
}

/**
* @return \Spryker\Zed\RouterExtension\Dependency\Plugin\RouterPluginInterface
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace SprykerTest\Zed\Router\Helper;

use Codeception\Module;

trait RouterHelperTrait
{
/**
Expand All @@ -25,5 +27,5 @@ protected function getRouterHelper(): RouterHelper
*
* @return \Codeception\Module
*/
abstract protected function getModule($name);
abstract protected function getModule(string $name): Module;
}
6 changes: 3 additions & 3 deletions tests/SprykerTest/Zed/Router/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ paths:
tests: .
data: ../../../_data
support: _support
log: ../../../_output
output: ../../../_output

coverage:
enabled: true
Expand All @@ -14,15 +14,15 @@ coverage:
suites:
Base:
path: ./Root
class_name: RouterRootTester
actor: RouterRootTester
modules:
enabled:
- \SprykerTest\Shared\Testify\Helper\Environment
- \SprykerTest\Shared\Testify\Helper\ConfigHelper

Communication:
path: ./Communication
class_name: RouterCommunicationTester
actor: RouterCommunicationTester
modules:
enabled:
- Asserts
Expand Down

0 comments on commit 541622f

Please sign in to comment.