Skip to content

Commit 48ac9e6

Browse files
committed
Move throw type test into existing MissingCheckedExceptionInMethodThrowsRuleTest
1 parent b96bd2e commit 48ac9e6

2 files changed

Lines changed: 18 additions & 46 deletions

File tree

tests/PHPStan/Rules/Exceptions/DomDocumentCreateElementThrowTypeExtensionTest.php

Lines changed: 0 additions & 46 deletions
This file was deleted.

tests/PHPStan/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRuleTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,22 @@ public function testBugArrayOffset(): void
9292
]);
9393
}
9494

95+
public function testBug13792(): void
96+
{
97+
$this->analyse([__DIR__ . '/data/bug-13792.php'], [
98+
[
99+
'Method Bug13792\Foo::dynamicName() throws checked exception DOMException but it\'s missing from the PHPDoc @throws tag.',
100+
20,
101+
],
102+
[
103+
'Method Bug13792\Foo::invalidConstantName() throws checked exception DOMException but it\'s missing from the PHPDoc @throws tag.',
104+
25,
105+
],
106+
[
107+
'Method Bug13792\Foo::unions() throws checked exception DOMException but it\'s missing from the PHPDoc @throws tag.',
108+
35,
109+
],
110+
]);
111+
}
112+
95113
}

0 commit comments

Comments
 (0)