Skip to content

Commit c92c389

Browse files
committed
tests: fix test cases that where previously found as invalid
1 parent f23d400 commit c92c389

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

tests/Parser/DocBlockParserTest.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public function getParseTests(): array
298298
],
299299
],
300300
],
301-
[
301+
'Test that @throws with a dot at the end works' => [
302302
'
303303
/**
304304
* @throws \InvalidArgumentException.
@@ -311,8 +311,14 @@ public function getParseTests(): array
311311
'longDesc' => '',
312312
'tags' => [
313313
'throws' => [
314-
'\InvalidArgumentException.',
315-
'\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException.',
314+
[
315+
'\InvalidArgumentException',
316+
'',
317+
],
318+
[
319+
'\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException',
320+
'',
321+
],
316322
],
317323
],
318324
],
@@ -594,7 +600,7 @@ public function getParseTests(): array
594600
],
595601
]],
596602
],
597-
[
603+
'Test that invalid @return format also works' => [
598604
'/**
599605
* Prepares queries for adding users and
600606
* also create database and return query and message
@@ -630,8 +636,12 @@ public function getParseTests(): array
630636
'SQL query for add a user',
631637
],
632638
],
633-
'return' => [
634-
'array, $message',
639+
640+
'return' => [ // Array from found tags.
641+
[ // First found tag.
642+
[['array', false]], // Array from data types.
643+
', $message', // The description
644+
],
635645
],
636646
],
637647
]],

tests/Parser/NodeVisitorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,6 @@ public function testAddTagFromCommentToMethodInvalidHint(): void
553553
);
554554
$this->assertSame(
555555
[
556-
'The hint on "prop1" at @var is invalid: "\Illuminate\Support\Carbon;"',
557556
],
558557
$errors
559558
);

0 commit comments

Comments
 (0)