Skip to content

Commit 11e56f2

Browse files
committed
Tests/FindImplementedInterfaceNamesTest: normalize data provider arrays
... to improve scannability of the test cases covered. See 225
1 parent e332340 commit 11e56f2

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

tests/Core/File/FindImplementedInterfaceNamesTest.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ public static function dataImplementedInterface()
8686
],
8787
'class implements single interface, unqualified' => [
8888
'identifier' => '/* testClassImplementsSingle */',
89-
'expected' => ['testFIINInterface'],
89+
'expected' => [
90+
'testFIINInterface',
91+
],
9092
],
9193
'class implements multiple interfaces' => [
9294
'identifier' => '/* testClassImplementsMultiple */',
@@ -97,11 +99,15 @@ public static function dataImplementedInterface()
9799
],
98100
'class implements single interface, fully qualified' => [
99101
'identifier' => '/* testImplementsFullyQualified */',
100-
'expected' => ['\PHP_CodeSniffer\Tests\Core\File\testFIINInterface'],
102+
'expected' => [
103+
'\PHP_CodeSniffer\Tests\Core\File\testFIINInterface',
104+
],
101105
],
102106
'class implements single interface, partially qualified' => [
103107
'identifier' => '/* testImplementsPartiallyQualified */',
104-
'expected' => ['Core\File\RelativeInterface'],
108+
'expected' => [
109+
'Core\File\RelativeInterface',
110+
],
105111
],
106112
'class extends and implements' => [
107113
'identifier' => '/* testClassThatExtendsAndImplements */',
@@ -123,7 +129,9 @@ public static function dataImplementedInterface()
123129
],
124130
'enum implements single interface, unqualified' => [
125131
'identifier' => '/* testEnumImplementsSingle */',
126-
'expected' => ['Colorful'],
132+
'expected' => [
133+
'Colorful',
134+
],
127135
],
128136
'enum implements multiple interfaces, unqualified + fully qualified' => [
129137
'identifier' => '/* testBackedEnumImplementsMulti */',
@@ -134,7 +142,9 @@ public static function dataImplementedInterface()
134142
],
135143
'anon class implements single interface, unqualified' => [
136144
'identifier' => '/* testAnonClassImplementsSingle */',
137-
'expected' => ['testFIINInterface'],
145+
'expected' => [
146+
'testFIINInterface',
147+
],
138148
],
139149
'parse error - implements keyword, but no interface name' => [
140150
'identifier' => '/* testMissingImplementsName */',

0 commit comments

Comments
 (0)