1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
psalm/tests/IssueSuppressionTest.php

36 lines
994 B
PHP
Raw Normal View History

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
class IssueSuppressionTest extends TestCase
2016-07-24 18:02:15 -04:00
{
use Traits\FileCheckerValidCodeParseTestTrait;
2016-07-24 18:02:15 -04:00
2017-01-13 14:07:23 -05:00
/**
* @return array
2017-01-13 14:07:23 -05:00
*/
public function providerFileCheckerValidCodeParse()
2016-07-24 18:02:15 -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
}