From 74421e1b5e179ae4f4e620c271ce86893b46d98f Mon Sep 17 00:00:00 2001 From: Daniel Ziegenberg Date: Fri, 22 Mar 2024 19:11:41 +0100 Subject: [PATCH] Add test for multiline attributes for MissingDocblockSniff Signed-off-by: Daniel Ziegenberg --- .../Commenting/MissingDocblockSniffTest.php | 6 +++ .../docblock_with_multiline_attributes.php | 50 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 moodle/Tests/Sniffs/Commenting/fixtures/MissingDocblock/docblock_with_multiline_attributes.php diff --git a/moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php b/moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php index 9d95312..f545276 100644 --- a/moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php +++ b/moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php @@ -129,6 +129,12 @@ public static function docblockCorrectnessProvider(): array { 'errors' => [], 'warnings' => [], ], + 'Docblock with attributes on function (correct)' => [ + 'fixture' => 'docblock_with_multiline_attributes', + 'fixtureFilename' => null, + 'errors' => [], + 'warnings' => [], + ], 'Testcase' => [ 'fixture' => 'testcase_class', 'fixtureFilename' => '/lib/tests/example_test.php', diff --git a/moodle/Tests/Sniffs/Commenting/fixtures/MissingDocblock/docblock_with_multiline_attributes.php b/moodle/Tests/Sniffs/Commenting/fixtures/MissingDocblock/docblock_with_multiline_attributes.php new file mode 100644 index 0000000..4d248e9 --- /dev/null +++ b/moodle/Tests/Sniffs/Commenting/fixtures/MissingDocblock/docblock_with_multiline_attributes.php @@ -0,0 +1,50 @@ +