-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathEchoDeprecatedBinaryOpToStringRuleTest.php
66 lines (61 loc) · 1.95 KB
/
EchoDeprecatedBinaryOpToStringRuleTest.php
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php declare(strict_types = 1);
namespace PHPStan\Rules\Deprecations;
/**
* @extends \PHPStan\Testing\RuleTestCase<EchoDeprecatedBinaryOpToStringRule>
*/
class EchoDeprecatedBinaryOpToStringRuleTest extends \PHPStan\Testing\RuleTestCase
{
protected function getRule(): \PHPStan\Rules\Rule
{
return new EchoDeprecatedBinaryOpToStringRule($this->createBroker());
}
public function testDeprecatedMagicMethodToStringCall(): void
{
require_once __DIR__ . '/data/echo-deprecated-binaryop-magic-method-tostring.php';
$this->analyse(
[__DIR__ . '/data/echo-deprecated-binaryop-magic-method-tostring.php'],
[
[
'Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBar.',
8,
],
[
'Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBar.',
9,
],
[
'Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBar.',
10,
],
[
'Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBar.',
11,
],
[
'Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBar.',
12,
],
[
"Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBarWithDesc:\nuse XY instead.",
15,
],
[
"Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBarWithDesc:\nuse XY instead.",
16,
],
[
"Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBarWithDesc:\nuse XY instead.",
17,
],
[
"Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBarWithDesc:\nuse XY instead.",
18,
],
[
"Call to deprecated method __toString() of class EchoDeprecatedBinaryOpToStringRule\MagicBarWithDesc:\nuse XY instead.",
19,
],
]
);
}
}