Skip to content

Commit 140ce8f

Browse files
committed
Tests/TypeIntersectionTest: fix order of tests
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 140ce8f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

tests/Core/Tokenizer/TypeIntersectionTest.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ class TypeIntersection
5959
\Fully\Qualified\NameA&\Fully\Qualified\NameB $paramC,
6060
) {}
6161

62-
/* testTypeIntersectionReturnType */
63-
public function returnType() : Foo&Bar {}
64-
6562
/* testTypeIntersectionConstructorPropertyPromotion */
6663
public function __construct( public Foo&Bar $property) {}
6764

65+
/* testTypeIntersectionReturnType */
66+
public function returnType() : Foo&Bar {}
67+
6868
/* testTypeIntersectionAbstractMethodReturnType1 */
6969
abstract public function abstractMethod(): Foo&Bar /* testTypeIntersectionAbstractMethodReturnType2 */ &Baz;
7070

@@ -78,16 +78,16 @@ class TypeIntersection
7878
public function identifierNamesReturnFQ() : \Fully\Qualified\NameA&\Fully\Qualified\NameB {}
7979
}
8080

81-
/* testTypeIntersectionClosureParamIllegalNullable */
82-
$closureWithParamType = function (?Foo&Bar $string) {};
83-
8481
function globalFunctionWithSpreadAndReference(
8582
/* testTypeIntersectionWithReference */
8683
Foo&Bar /* testBitwiseAnd5 */ &$paramA,
8784
/* testTypeIntersectionWithSpreadOperator */
8885
Foo&Bar ...$paramB
8986
) {}
9087

88+
/* testTypeIntersectionClosureParamIllegalNullable */
89+
$closureWithParamType = function (?Foo&Bar $string) {};
90+
9191
/* testBitwiseAndClosureParamDefault */
9292
$closureWithReturnType = function ($string = NONSENSE & FAKE)/* testTypeIntersectionClosureReturn */ : \Package\MyA&PackageB {};
9393

tests/Core/Tokenizer/TypeIntersectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ public static function dataTypeIntersection()
116116
['/* testTypeIntersectionParamNamespaceRelative */'],
117117
['/* testTypeIntersectionParamPartiallyQualified */'],
118118
['/* testTypeIntersectionParamFullyQualified */'],
119-
['/* testTypeIntersectionReturnType */'],
120119
['/* testTypeIntersectionConstructorPropertyPromotion */'],
120+
['/* testTypeIntersectionReturnType */'],
121121
['/* testTypeIntersectionAbstractMethodReturnType1 */'],
122122
['/* testTypeIntersectionAbstractMethodReturnType2 */'],
123123
['/* testTypeIntersectionReturnTypeNamespaceRelative */'],
124124
['/* testTypeIntersectionReturnPartiallyQualified */'],
125125
['/* testTypeIntersectionReturnFullyQualified */'],
126-
['/* testTypeIntersectionClosureParamIllegalNullable */'],
127126
['/* testTypeIntersectionWithReference */'],
128127
['/* testTypeIntersectionWithSpreadOperator */'],
128+
['/* testTypeIntersectionClosureParamIllegalNullable */'],
129129
['/* testTypeIntersectionClosureReturn */'],
130130
['/* testTypeIntersectionArrowParam */'],
131131
['/* testTypeIntersectionArrowReturnType */'],

0 commit comments

Comments
 (0)