2016-07-24 18:02:15 -04:00
|
|
|
<?php
|
2016-07-25 18:37:44 -04:00
|
|
|
namespace Psalm\Tests;
|
2016-07-24 18:02:15 -04:00
|
|
|
|
2017-04-24 23:45:02 -04:00
|
|
|
class IssueSuppressionTest extends TestCase
|
2016-07-24 18:02:15 -04:00
|
|
|
{
|
2017-04-24 23:45:02 -04:00
|
|
|
use Traits\FileCheckerValidCodeParseTestTrait;
|
2016-07-24 18:02:15 -04:00
|
|
|
|
2017-01-13 14:07:23 -05:00
|
|
|
/**
|
2017-04-24 23:45:02 -04:00
|
|
|
* @return array
|
2017-01-13 14:07:23 -05:00
|
|
|
*/
|
2017-04-24 23:45:02 -04:00
|
|
|
public function providerFileCheckerValidCodeParse()
|
2016-07-24 18:02:15 -04:00
|
|
|
{
|
2017-04-24 23:45:02 -04:00
|
|
|
return [
|
|
|
|
'undefinedClass' => [
|
|
|
|
'<?php
|
|
|
|
class A {
|
|
|
|
/**
|
|
|
|
* @psalm-suppress UndefinedClass
|
|
|
|
* @psalm-suppress MixedMethodCall
|
|
|
|
* @psalm-suppress MissingReturnType
|
|
|
|
*/
|
|
|
|
public function b() {
|
|
|
|
B::fooFoo()->barBar()->bat()->baz()->bam()->bas()->bee()->bet()->bes()->bis();
|
|
|
|
}
|
|
|
|
}'
|
|
|
|
],
|
|
|
|
'excludeIssue' => [
|
|
|
|
'<?php
|
|
|
|
fooFoo();',
|
|
|
|
'assertions' => [],
|
|
|
|
'error_levels' => ['UndefinedFunction']
|
|
|
|
]
|
|
|
|
];
|
2016-12-14 12:28:38 -05:00
|
|
|
}
|
2016-07-24 18:02:15 -04:00
|
|
|
}
|