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:
parent
243c09de37
commit
d578c44a37
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -97,4 +97,8 @@ class ParserInstanceCacheProvider extends \Psalm\Internal\Provider\ParserCachePr
|
||||
{
|
||||
$this->file_contents_cache[$file_path] = $file_contents;
|
||||
}
|
||||
|
||||
public function saveFileContentHashes()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -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()
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user