Skip to content

Commit a0012c2

Browse files
committed
Restructure MissingDocblocks fixtures
1 parent c212c65 commit a0012c2

11 files changed

+13
-13
lines changed

moodle/Tests/Sniffs/Commenting/MissingDocblockSniffTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testMissingDocblockSniff(
4343
): void {
4444
$this->setStandard('moodle');
4545
$this->setSniff('moodle.Commenting.MissingDocblock');
46-
$this->setFixture(sprintf("%s/fixtures/%s.php", __DIR__, $fixture), $fixtureFilename);
46+
$this->setFixture(sprintf("%s/fixtures/MissingDocblock/%s.php", __DIR__, $fixture), $fixtureFilename);
4747
$this->setWarnings($warnings);
4848
$this->setErrors($errors);
4949
$this->setComponentMapping([
@@ -56,10 +56,10 @@ public function testMissingDocblockSniff(
5656
public static function docblockCorrectnessProvider(): array {
5757
$cases = [
5858
'Multiple artifacts in a file' => [
59-
'fixture' => 'missing_docblock_multiple_artifacts',
59+
'fixture' => 'multiple_artifacts',
6060
'fixtureFilename' => null,
6161
'errors' => [
62-
1 => 'Missing docblock for file missing_docblock_multiple_artifacts.php',
62+
1 => 'Missing docblock for file multiple_artifacts.php',
6363
34 => 'Missing docblock for function missing_docblock_in_function',
6464
38 => 'Missing docblock for class missing_docblock_in_class',
6565
95 => 'Missing docblock for interface missing_docblock_interface',
@@ -76,61 +76,61 @@ public static function docblockCorrectnessProvider(): array {
7676
],
7777
],
7878
'File level tag, no class' => [
79-
'fixture' => 'missing_docblock_class_without_docblock',
79+
'fixture' => 'class_without_docblock',
8080
'fixtureFilename' => null,
8181
'errors' => [
8282
11 => 'Missing docblock for class class_without_docblock',
8383
],
8484
'warnings' => [],
8585
],
8686
'Class only (incorrect whitespace)' => [
87-
'fixture' => 'missing_docblock_class_only_with_incorrect_whitespace',
87+
'fixture' => 'class_only_with_incorrect_whitespace',
8888
'fixtureFilename' => null,
8989
'errors' => [
9090
11 => 'Missing docblock for class class_only_with_incorrect_whitespace',
9191
],
9292
'warnings' => [],
9393
],
9494
'Class only (correct)' => [
95-
'fixture' => 'missing_docblock_class_only',
95+
'fixture' => 'class_only',
9696
'fixtureFilename' => null,
9797
'errors' => [],
9898
'warnings' => [],
9999
],
100100
'Class only with attributes (correct)' => [
101-
'fixture' => 'missing_docblock_class_only_with_attributes',
101+
'fixture' => 'class_only_with_attributes',
102102
'fixtureFilename' => null,
103103
'errors' => [],
104104
'warnings' => [],
105105
],
106106
'Class only with attributes and incorrect whitespace' => [
107-
'fixture' => 'missing_docblock_class_only_with_attributes_incorrect_whitespace',
107+
'fixture' => 'class_only_with_attributes_incorrect_whitespace',
108108
'fixtureFilename' => null,
109109
'errors' => [
110110
13 => 'Missing docblock for class class_only_with_attributes_incorrect_whitespace',
111111
],
112112
'warnings' => [],
113113
],
114114
'Class and file (correct)' => [
115-
'fixture' => 'missing_docblock_class_and_file',
115+
'fixture' => 'class_and_file',
116116
'fixtureFilename' => null,
117117
'errors' => [],
118118
'warnings' => [],
119119
],
120120
'Interface only (correct)' => [
121-
'fixture' => 'missing_docblock_interface_only',
121+
'fixture' => 'interface_only',
122122
'fixtureFilename' => null,
123123
'errors' => [],
124124
'warnings' => [],
125125
],
126126
'Trait only (correct)' => [
127-
'fixture' => 'missing_docblock_trait_only',
127+
'fixture' => 'trait_only',
128128
'fixtureFilename' => null,
129129
'errors' => [],
130130
'warnings' => [],
131131
],
132132
'Testcase' => [
133-
'fixture' => 'MissingDocblock/testcase_class',
133+
'fixture' => 'testcase_class',
134134
'fixtureFilename' => '/lib/tests/example_test.php',
135135
'errors' => [
136136
3 => 'Missing docblock for class example_test',
@@ -143,7 +143,7 @@ public static function docblockCorrectnessProvider(): array {
143143

144144
if (version_compare(PHP_VERSION, '8.1.0') >= 0) {
145145
$cases['Enum only (correct)'] = [
146-
'fixture' => 'missing_docblock_enum_only',
146+
'fixture' => 'enum_only',
147147
'fixtureFilename' => null,
148148
'errors' => [],
149149
'warnings' => [],

0 commit comments

Comments
 (0)