Skip to content

Commit

Permalink
fix extension initialization (fixes allure-framework#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
remorhaz committed May 25, 2024
1 parent 97cfea0 commit c8e015d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
os:
- ubuntu-latest
- windows-latest
Expand Down Expand Up @@ -49,10 +50,4 @@ jobs:
${{ matrix.composer-options }}

- name: Run tests
if: ${{ matrix.php-version != '8.2' }}
run: composer test

- name: Run tests (experimental)
if: ${{ matrix.php-version == '8.2' }}
continue-on-error: true
run: composer test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extensions:
outputDirectory: allure-results
linkTemplates:
issue: https://example.org/issues/%s
setipHook: My\SetupHook
setupHook: My\SetupHook
```
`outputDirectory` is used to store Allure results and will be calculated
Expand Down
14 changes: 14 additions & 0 deletions src/AllureCodeception.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,21 @@ final class AllureCodeception extends Extension
* @throws ConfigurationException
* phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
*/
public function _initialize(): void
{
parent::_initialize();
$this->reconfigure();
}

/**
* @throws ConfigurationException
*/
public function moduleInit(): void
{
$this->reconfigure();
}

private function reconfigure(): void
{
QametaAllure::reset();
$this->testLifecycle = null;
Expand Down

0 comments on commit c8e015d

Please sign in to comment.