You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class AddAssociationMatchOptionsTypesRuleTest extends RuleTestCase
14
14
{
15
+
use AnalyseCheckLineStartsWithTrait;
16
+
15
17
/**
16
18
* @return \PHPStan\Rules\Rule
17
19
*/
@@ -38,14 +40,7 @@ protected function getRule(): Rule
38
40
*/
39
41
publicfunctiontestRule(): void
40
42
{
41
-
$messageThrough = 'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through" (Cake\ORM\Table|string|null) does not accept stdClass.';
42
-
if (version_compare(Configure::version(), '5.0.5', '<')) {
43
-
$messageThrough = 'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through" (Cake\ORM\Table|string) does not accept stdClass.';
44
-
}
45
-
// first argument: path to the example file that contains some errors that should be reported by MyRule
46
-
// second argument: an array of expected errors,
47
-
// each error consists of the asserted error message, and the asserted error file line
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "className" (string) does not accept false.',
51
46
66,
@@ -67,12 +62,12 @@ public function testRule(): void
67
62
66,
68
63
],
69
64
[
70
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "bindingKey" (list<string>|string) does not accept 10.',
65
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "bindingKey" ',
71
66
66,
72
67
'Type #1 from the union: 10 is not a list.',
73
68
],
74
69
[
75
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "foreignKey" (list<string>|string|false) does not accept 11.',
70
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsTo with option "foreignKey" ',
76
71
66,
77
72
'Type #1 from the union: 11 is not a list.',
78
73
],
@@ -114,7 +109,7 @@ public function testRule(): void
114
109
'Type #1 from the union: Closure(): 10 is not a list.',
115
110
],
116
111
[
117
-
$messageThrough,
112
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::belongsToMany with option "through"',
118
113
98,
119
114
],
120
115
[
@@ -150,12 +145,12 @@ public function testRule(): void
150
145
120,
151
146
],
152
147
[
153
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "bindingKey" (list<string>|string) does not accept 10.',
148
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "bindingKey" ',
154
149
120,
155
150
'Type #1 from the union: 10 is not a list.',
156
151
],
157
152
[
158
-
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "foreignKey" (list<string>|string|false) does not accept 11.',
153
+
'Call to CakeDC\PHPStan\Test\TestCase\Rule\Model\Fake\FailingRuleItemsTable::hasOne with option "foreignKey" ',
159
154
120,
160
155
'Type #1 from the union: 11 is not a list.',
161
156
],
@@ -220,12 +215,12 @@ public function testRule(): void
220
215
148,
221
216
],
222
217
[
223
-
'Call to Cake\ORM\AssociationCollection::load with option "bindingKey" (list<string>|string) does not accept 10.',
218
+
'Call to Cake\ORM\AssociationCollection::load with option "bindingKey" ',
224
219
148,
225
220
'Type #1 from the union: 10 is not a list.',
226
221
],
227
222
[
228
-
'Call to Cake\ORM\AssociationCollection::load with option "foreignKey" (list<string>|string|false) does not accept 11.',
223
+
'Call to Cake\ORM\AssociationCollection::load with option "foreignKey" ',
0 commit comments