Issues (35)

tests/CreateTemporaryPsalmXmlFileTest.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace UsageFinder\Tests;
6
7
use UsageFinder\CreateTemporaryPsalmXmlFile;
8
use function file_exists;
9
use function file_get_contents;
10
11
final class CreateTemporaryPsalmXmlFileTest extends TestCase
12
{
13
    public function testInvoke() : void
14
    {
15
        $path = (new CreateTemporaryPsalmXmlFile())->__invoke(__DIR__ . '/example');
16
17
        self::assertTrue(file_exists($path));
18
19
        $xml = file_get_contents($path);
20
21
        self::assertStringContainsString('<directory name="src" />', $xml);
0 ignored issues
show
The method assertStringContainsString() does not exist on UsageFinder\Tests\CreateTemporaryPsalmXmlFileTest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        self::/** @scrutinizer ignore-call */ 
22
              assertStringContainsString('<directory name="src" />', $xml);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
22
        self::assertStringContainsString('<directory name="vendor" />', $xml);
23
    }
24
}
25