Skip to content

Commit 960e8b4

Browse files
committed
Tests/BitwiseOrTest: fix order of tests
The data set order did not match the order of the tests in the test case file. Also the test order in the test case file was at times confusing (by the looks of it caused by incorrect merge conflict resolution, which hasn't kept tests which were grouped together, together). Fixed now.
1 parent 8ecd89e commit 960e8b4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/Core/Tokenizer/BitwiseOrTest.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ class TypeUnion
7171
\Fully\Qualified\NameA|\Fully\Qualified\NameB $paramC,
7272
) {}
7373

74-
/* testTypeUnionReturnType */
75-
public function returnType() : int|false {}
76-
7774
/* testTypeUnionConstructorPropertyPromotion */
7875
public function __construct( public bool|null $property) {}
7976

77+
/* testTypeUnionReturnType */
78+
public function returnType() : int|false {}
79+
8080
/* testTypeUnionAbstractMethodReturnType1 */
8181
abstract public function abstractMethod(): object|array /* testTypeUnionAbstractMethodReturnType2 */ |false;
8282

@@ -90,16 +90,16 @@ class TypeUnion
9090
public function identifierNamesReturnFQ() : \Fully\Qualified\NameA|\Fully\Qualified\NameB {}
9191
}
9292

93-
/* testTypeUnionClosureParamIllegalNullable */
94-
$closureWithParamType = function (?string|null $string) {};
95-
9693
function globalFunctionWithSpreadAndReference(
9794
/* testTypeUnionWithReference */
9895
float|null &$paramA,
9996
/* testTypeUnionWithSpreadOperator */
10097
string|int ...$paramB
10198
) {}
10299

100+
/* testTypeUnionClosureParamIllegalNullable */
101+
$closureWithParamType = function (?string|null $string) {};
102+
103103
/* testBitwiseOrClosureParamDefault */
104104
$closureWithReturnType = function ($string = NONSENSE | FAKE)/* testTypeUnionClosureReturn */ : \Package\MyA|PackageB {};
105105

tests/Core/Tokenizer/BitwiseOrTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public static function dataTypeUnion()
106106
['/* testTypeUnionPropertyPartiallyQualified */'],
107107
['/* testTypeUnionPropertyFullyQualified */'],
108108
['/* testTypeUnionPropertyWithReadOnlyKeyword */'],
109-
['/* testTypeUnionPropertyWithReadOnlyKeywordFirst */'],
110109
['/* testTypeUnionPropertyWithStaticAndReadOnlyKeywords */'],
111110
['/* testTypeUnionPropertyWithVarAndReadOnlyKeywords */'],
111+
['/* testTypeUnionPropertyWithReadOnlyKeywordFirst */'],
112112
['/* testTypeUnionPropertyWithOnlyReadOnlyKeyword */'],
113113
['/* testTypeUnionPropertyWithOnlyStaticKeyword */'],
114114
['/* testTypeUnionParam1 */'],
@@ -117,16 +117,16 @@ public static function dataTypeUnion()
117117
['/* testTypeUnionParamNamespaceRelative */'],
118118
['/* testTypeUnionParamPartiallyQualified */'],
119119
['/* testTypeUnionParamFullyQualified */'],
120-
['/* testTypeUnionReturnType */'],
121120
['/* testTypeUnionConstructorPropertyPromotion */'],
121+
['/* testTypeUnionReturnType */'],
122122
['/* testTypeUnionAbstractMethodReturnType1 */'],
123123
['/* testTypeUnionAbstractMethodReturnType2 */'],
124124
['/* testTypeUnionReturnTypeNamespaceRelative */'],
125125
['/* testTypeUnionReturnPartiallyQualified */'],
126126
['/* testTypeUnionReturnFullyQualified */'],
127-
['/* testTypeUnionClosureParamIllegalNullable */'],
128127
['/* testTypeUnionWithReference */'],
129128
['/* testTypeUnionWithSpreadOperator */'],
129+
['/* testTypeUnionClosureParamIllegalNullable */'],
130130
['/* testTypeUnionClosureReturn */'],
131131
['/* testTypeUnionArrowParam */'],
132132
['/* testTypeUnionArrowReturnType */'],

0 commit comments

Comments
 (0)