mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
fix failing mock tests
This commit is contained in:
parent
e15e03d6cf
commit
40679e9a82
@ -18,6 +18,6 @@ class SuicidalAutoloaderTest extends TestCase
|
||||
$this->markTestSkipped('Test case requires PHP 7.2.');
|
||||
}
|
||||
|
||||
$this->runPsalm(['--no-cache'], __DIR__ . '/' . '../fixtures/SuicidalAutoloader/');
|
||||
$this->runPsalm(['--no-cache'], __DIR__ . '/' . '../fixtures/SuicidalAutoloader');
|
||||
}
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
* @psalm-suppress MixedInferredReturnType
|
||||
* @psalm-suppress MixedReturnStatement
|
||||
*/
|
||||
function mock(string $className)
|
||||
function mockHelper(string $className)
|
||||
{
|
||||
eval(\'"there be dragons"\');
|
||||
|
||||
@ -424,10 +424,10 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
*/
|
||||
function useMockTemplated(string $className) : void
|
||||
{
|
||||
mock($className)->checkExpectations();
|
||||
mockHelper($className)->checkExpectations();
|
||||
}
|
||||
|
||||
mock(A::class)->foo();',
|
||||
mockHelper(A::class)->foo();',
|
||||
],
|
||||
'allowTemplatedIntersectionFirstTemplatedMock' => [
|
||||
'code' => '<?php
|
||||
@ -445,7 +445,7 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
* @psalm-suppress MixedInferredReturnType
|
||||
* @psalm-suppress MixedReturnStatement
|
||||
*/
|
||||
function mock(string $className)
|
||||
function mockHelper(string $className)
|
||||
{
|
||||
eval(\'"there be dragons"\');
|
||||
|
||||
@ -462,10 +462,10 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
*/
|
||||
function useMockTemplated(string $className) : void
|
||||
{
|
||||
mock($className)->checkExpectations();
|
||||
mockHelper($className)->checkExpectations();
|
||||
}
|
||||
|
||||
mock(A::class)->foo();',
|
||||
mockHelper(A::class)->foo();',
|
||||
],
|
||||
'allowTemplatedIntersectionSecond' => [
|
||||
'code' => '<?php
|
||||
@ -483,7 +483,7 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
* @psalm-suppress MixedInferredReturnType
|
||||
* @psalm-suppress MixedReturnStatement
|
||||
*/
|
||||
function mock(string $className)
|
||||
function mockHelper(string $className)
|
||||
{
|
||||
eval(\'"there be dragons"\');
|
||||
|
||||
@ -498,7 +498,7 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
* @psalm-param class-string $className
|
||||
*/
|
||||
function useMock(string $className) : void {
|
||||
mock($className)->checkExpectations();
|
||||
mockHelper($className)->checkExpectations();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -507,10 +507,10 @@ class FunctionClassStringTemplateTest extends TestCase
|
||||
*/
|
||||
function useMockTemplated(string $className) : void
|
||||
{
|
||||
mock($className)->checkExpectations();
|
||||
mockHelper($className)->checkExpectations();
|
||||
}
|
||||
|
||||
mock(A::class)->foo();',
|
||||
mockHelper(A::class)->foo();',
|
||||
],
|
||||
'returnClassString' => [
|
||||
'code' => '<?php
|
||||
|
Loading…
Reference in New Issue
Block a user