Skip to content

Commit

Permalink
Tests/AttributesTest: activate a test
Browse files Browse the repository at this point in the history
This test case already existed in the test case file, but was not being tested so far.

Fixed now.
  • Loading branch information
jrfnl committed Jan 14, 2024
1 parent a1d1366 commit 4920451
Showing 1 changed file with 48 additions and 9 deletions.
57 changes: 48 additions & 9 deletions tests/Core/Tokenizer/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ function ($token) use ($attribute, $length) {
public static function dataAttribute()
{
return [
'class attribute' => [
'class attribute' => [
'testMarker' => '/* testAttribute */',
'length' => 2,
'tokenCodes' => [
T_STRING
],
],
'class attribute with param' => [
'class attribute with param' => [
'testMarker' => '/* testAttributeWithParams */',
'length' => 7,
'tokenCodes' => [
Expand All @@ -88,7 +88,7 @@ public static function dataAttribute()
T_CLOSE_PARENTHESIS,
],
],
'class attribute with named param' => [
'class attribute with named param' => [
'testMarker' => '/* testAttributeWithNamedParam */',
'length' => 10,
'tokenCodes' => [
Expand All @@ -103,14 +103,14 @@ public static function dataAttribute()
T_CLOSE_PARENTHESIS,
],
],
'function attribute' => [
'function attribute' => [
'testMarker' => '/* testAttributeOnFunction */',
'length' => 2,
'tokenCodes' => [
T_STRING
],
],
'function attribute with params' => [
'function attribute with params' => [
'testMarker' => '/* testAttributeOnFunctionWithParams */',
'length' => 17,
'tokenCodes' => [
Expand All @@ -132,7 +132,7 @@ public static function dataAttribute()
T_CLOSE_PARENTHESIS,
],
],
'function attribute with arrow function as param' => [
'function attribute with arrow function as param' => [
'testMarker' => '/* testAttributeWithShortClosureParameter */',
'length' => 17,
'tokenCodes' => [
Expand All @@ -154,7 +154,7 @@ public static function dataAttribute()
T_CLOSE_PARENTHESIS,
],
],
'function attribute; multiple comma separated classes' => [
'function attribute; multiple comma separated classes' => [
'testMarker' => '/* testAttributeGrouping */',
'length' => 26,
'tokenCodes' => [
Expand Down Expand Up @@ -185,7 +185,7 @@ public static function dataAttribute()
T_CLOSE_PARENTHESIS,
],
],
'function attribute; multiple comma separated classes, one per line' => [
'function attribute; multiple comma separated classes, one per line' => [
'testMarker' => '/* testAttributeMultiline */',
'length' => 31,
'tokenCodes' => [
Expand Down Expand Up @@ -221,7 +221,46 @@ public static function dataAttribute()
T_WHITESPACE,
],
],
'function attribute; using partially qualified and fully qualified class names' => [
'function attribute; multiple comma separated classes, one per line, with comments' => [
'testMarker' => '/* testAttributeMultilineWithComment */',
'length' => 34,
'tokenCodes' => [
T_WHITESPACE,
T_WHITESPACE,
T_STRING,
T_COMMA,
T_WHITESPACE,
T_COMMENT,
T_WHITESPACE,
T_STRING,
T_OPEN_PARENTHESIS,
T_COMMENT,
T_WHITESPACE,
T_CONSTANT_ENCAPSED_STRING,
T_CLOSE_PARENTHESIS,
T_COMMA,
T_WHITESPACE,
T_WHITESPACE,
T_STRING,
T_OPEN_PARENTHESIS,
T_CONSTANT_ENCAPSED_STRING,
T_COMMA,
T_WHITESPACE,
T_PARAM_NAME,
T_COLON,
T_WHITESPACE,
T_OPEN_SHORT_ARRAY,
T_CONSTANT_ENCAPSED_STRING,
T_WHITESPACE,
T_DOUBLE_ARROW,
T_WHITESPACE,
T_CONSTANT_ENCAPSED_STRING,
T_CLOSE_SHORT_ARRAY,
T_CLOSE_PARENTHESIS,
T_WHITESPACE,
],
],
'function attribute; using partially qualified and fully qualified class names' => [
'testMarker' => '/* testFqcnAttribute */',
'length' => 13,
'tokenCodes' => [
Expand Down

0 comments on commit 4920451

Please sign in to comment.