1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
psalm/tests/IssueSuppressionTest.php
Jon Ursenbach 11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00

36 lines
994 B
PHP

<?php
namespace Psalm\Tests;
class IssueSuppressionTest extends TestCase
{
use Traits\FileCheckerValidCodeParseTestTrait;
/**
* @return array
*/
public function providerFileCheckerValidCodeParse()
{
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']
]
];
}
}