Skip to content

Commit

Permalink
Merge pull request #189 from timhunt/phpdoc-transform
Browse files Browse the repository at this point in the history
Fixes #188. @Transform PHPdoc should be allowed in Behat files
  • Loading branch information
andrewnicols authored Nov 4, 2024
2 parents 89ff0ac + 08c40c3 commit 5cb7a7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moodle/Tests/Util/DocblocksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class behat_example {
* @Given
* @When
* @Then
* @Given
* @Transform
*/
function exampleFunction(string $param): void {}
}',
Expand All @@ -288,7 +288,7 @@ class test_behat {
* @Given
* @When
* @Then
* @Given
* @Transform
*/
function exampleFunction(string $param): void {}
}',
Expand Down
2 changes: 2 additions & 0 deletions moodle/Util/Docblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ abstract class Docblocks
'AfterFeature' => true,
'AfterScenario' => true,
'AfterStep' => true,
'Transform' => true,

// PHPUnit tags.
'codeCoverageIgnore' => true,
Expand Down Expand Up @@ -130,6 +131,7 @@ abstract class Docblocks
'AfterFeature' => ['#.*/tests/behat/.*#'],
'AfterScenario' => ['#.*/tests/behat/.*#'],
'AfterStep' => ['#.*/tests/behat/.*#'],
'Transform' => ['#.*/tests/behat/.*#'],

'covers' => ['#.*/tests/.*_test.php#'],
'coversDefaultClass' => ['#.*/tests/.*_test.php#'],
Expand Down

0 comments on commit 5cb7a7a

Please sign in to comment.