forked from phpstan/phpstan-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBug14366Test.php
More file actions
40 lines (33 loc) · 718 Bytes
/
Bug14366Test.php
File metadata and controls
40 lines (33 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php declare(strict_types = 1);
namespace PHPStan\Rules\RestrictedUsage;
use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
/**
* @extends RuleTestCase<RestrictedFunctionUsageRule>
*/
class Bug14366Test extends RuleTestCase
{
protected function getRule(): Rule
{
return new RestrictedFunctionUsageRule(
self::getContainer(),
self::createReflectionProvider(),
);
}
public function testRule(): void
{
$this->analyse([__DIR__ . '/data/bug-14366.php'], [
[
'Call to deprecated function curl_close().',
28,
],
]);
}
public static function getAdditionalConfigFiles(): array
{
return [
__DIR__ . '/bug-14366.neon',
...parent::getAdditionalConfigFiles(),
];
}
}