Skip to content

Commit 0518ae4

Browse files
Add non regression tests
1 parent e0c4844 commit 0518ae4

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

tests/PHPStan/Rules/Properties/MissingPropertyTypehintRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public function testBug3402(): void
6666
$this->analyse([__DIR__ . '/data/bug-3402.php'], []);
6767
}
6868

69+
public function testBug11761(): void
70+
{
71+
$this->analyse([__DIR__ . '/data/bug-11761-bis.php'], []);
72+
}
73+
6974
public function testPromotedProperties(): void
7075
{
7176
$this->analyse([__DIR__ . '/data/promoted-properties-missing-typehint.php'], []);

tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ public function testBug12466(): void
265265
]);
266266
}
267267

268+
public function testBug11761(): void
269+
{
270+
$this->reportMaybes = true;
271+
$this->analyse([__DIR__ . '/data/bug-11761.php'], []);
272+
}
273+
268274
#[RequiresPhp('>= 8.4')]
269275
public function testBug12586(): void
270276
{
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug11761Bis;
4+
5+
class ApiLimitExceededException extends \Exception
6+
{
7+
protected $message = 'You have exceeded the 300 API calls per minute.';
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php declare(strict_types = 1);
2+
3+
namespace Bug11761;
4+
5+
class ApiLimitExceededException extends \Exception
6+
{
7+
/** @var string */
8+
protected $message = 'You have exceeded the 300 API calls per minute.';
9+
}

0 commit comments

Comments
 (0)