1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Add more mocking to tests

This commit is contained in:
Brown 2020-06-06 16:57:25 -04:00
parent 243c09de37
commit d578c44a37
3 changed files with 16 additions and 2 deletions

View File

@ -55,7 +55,8 @@ class FakeFileReferenceCacheProvider extends \Psalm\Internal\Provider\FileRefere
*/
private $cached_file_maps = [];
public function __construct() {
public function __construct()
{
$this->config = \Psalm\Config::getInstance();
}
@ -284,4 +285,13 @@ class FakeFileReferenceCacheProvider extends \Psalm\Internal\Provider\FileRefere
{
$this->cached_file_maps = $file_maps;
}
/**
* @param array<string, array{int, int}> $mixed_counts
*
* @return void
*/
public function setTypeCoverage(array $mixed_counts)
{
}
}

View File

@ -97,4 +97,8 @@ class ParserInstanceCacheProvider extends \Psalm\Internal\Provider\ParserCachePr
{
$this->file_contents_cache[$file_path] = $file_contents;
}
public function saveFileContentHashes()
{
}
}

View File

@ -187,7 +187,7 @@ class ProjectCheckerTest extends TestCase
$this->assertSame(0, \Psalm\IssueBuffer::getErrorCount());
$this->assertSame(
'No files analyzed',
'Psalm was able to infer types for 100% of the codebase',
$this->project_analyzer->getCodebase()->analyzer->getTypeInferenceSummary(
$this->project_analyzer->getCodebase()
)