diff --git a/src/Codeception/Test/Loader/Gherkin.php b/src/Codeception/Test/Loader/Gherkin.php index bad45189d6..1e5f0f9053 100644 --- a/src/Codeception/Test/Loader/Gherkin.php +++ b/src/Codeception/Test/Loader/Gherkin.php @@ -68,7 +68,7 @@ protected function fetchGherkinSteps() if (empty($this->steps) && empty($contexts['default']) && $this->settings['actor']) { // if no context is set, actor to be a context $actorContext = $this->settings['namespace'] - ? rtrim($this->settings['namespace'] . '\\' . $this->settings['actor'], '\\') + ? rtrim($this->settings['namespace'], '\\') . '\\' . rtrim($this->settings['actor'], '\\') : $this->settings['actor']; if ($actorContext) { $contexts['default'][] = $actorContext;