Skip to content

Commit 8b062d4

Browse files
committed
Test slevomat dev version and move test cases
1 parent ec345db commit 8b062d4

13 files changed

+42
-303
lines changed

coder_sniffer/Drupal/Sniffs/Classes/FullyQualifiedNamespaceSniff.php

Lines changed: 0 additions & 212 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"ext-mbstring": "*",
1919
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1 || ^1.0.0",
2020
"sirbrillig/phpcs-variable-analysis": "^2.11.7",
21-
"slevomat/coding-standard": "^8.11",
21+
"slevomat/coding-standard": "dev-master",
2222
"squizlabs/php_codesniffer": "^3.7.1",
2323
"symfony/yaml": ">=3.4.0"
2424
},

tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.php

Lines changed: 0 additions & 78 deletions
This file was deleted.

tests/Drupal/Commenting/ClassCommentUnitTest.inc.fixed

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Testing class/trait comments.
66
*/
77

8+
use Some\Attribute;
9+
810
/**
911
*
1012
*/
@@ -60,7 +62,7 @@ class WrongSpacing {
6062
/**
6163
* This is correct.
6264
*/
63-
#[Some\Attribute(foo: 'bar')]
65+
#[Attribute(foo: 'bar')]
6466
#[Other\Attribute(baz: 'qux')]
6567
class DoubleAttribute {
6668

tests/Drupal/Commenting/FunctionCommentUnitTest.inc.fixed

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* Some function comment tests.
66
*/
77

8+
use Some\Attribute;
9+
810
/**
911
* Test.
1012
*
@@ -579,7 +581,7 @@ class Test41 {
579581
/**
580582
* Method docblock.
581583
*/
582-
#[Some\Attribute(foo: 'bar')]
584+
#[Attribute(foo: 'bar')]
583585
#[Other\Attribute(baz: 'qux')]
584586
public function method() {
585587
}
File renamed without changes.
File renamed without changes.

tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.inc renamed to tests/Drupal/bad/BadFullyQualifiedNamespace.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use Test\MultiLine as MultiLineAlias,
1212
Test\MultiLineSecond;
1313

1414
/**
15-
* Example.
15+
* Example with lots of variations.
1616
*/
1717
class Example {
1818

tests/Drupal/Classes/FullyQualifiedNamespaceUnitTest.inc.fixed renamed to tests/Drupal/bad/BadFullyQualifiedNamespace.inc.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use Test\MultiLineSecond;
1313
use Test\NotUsed;
1414

1515
/**
16-
* Example.
16+
* Example with lots of variations.
1717
*/
1818
class Example {
1919

tests/Drupal/bad/BadUnitTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,20 @@ protected function getErrorList(string $testFile): array
382382
846 => 2,
383383
852 => 2,
384384
];
385+
case 'BadFullyQualifiedNamespace.inc':
386+
return [
387+
10 => 1,
388+
11 => 1,
389+
29 => 1,
390+
36 => 1,
391+
43 => 1,
392+
57 => 1,
393+
64 => 1,
394+
71 => 2,
395+
78 => 1,
396+
];
397+
case 'BadFullyQualifiedNamespace.1.inc':
398+
return [16 => 1];
385399
}//end switch
386400

387401
return [];
@@ -431,6 +445,8 @@ protected function getWarningList(string $testFile): array
431445
823 => 1,
432446
824 => 1,
433447
];
448+
case 'BadFullyQualifiedNamespace.inc':
449+
return [9 => 1];
434450
}//end switch
435451

436452
return [];

0 commit comments

Comments
 (0)