mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
adding DIRECTORY_SEPARATOR to tests that fail under windows
This commit is contained in:
parent
d45326759f
commit
4a56688800
@ -253,7 +253,7 @@ class BinaryOperationTest extends TestCase
|
|||||||
'<?php
|
'<?php
|
||||||
$a = gmp_init(2);
|
$a = gmp_init(2);
|
||||||
$b = "a" + $a;',
|
$b = "a" + $a;',
|
||||||
'error_message' => 'InvalidOperand - src/somefile.php:3 - Cannot add GMP to non-numeric type',
|
'error_message' => 'InvalidOperand - src' . DIRECTORY_SEPARATOR . 'somefile.php:3 - Cannot add GMP to non-numeric type',
|
||||||
],
|
],
|
||||||
'stringIncrement' => [
|
'stringIncrement' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
@ -434,7 +434,7 @@ class MagicMethodAnnotationTest extends TestCase
|
|||||||
$child = new Child();
|
$child = new Child();
|
||||||
$child->getString();
|
$child->getString();
|
||||||
$child->foo();',
|
$child->foo();',
|
||||||
'error_message' => 'UndefinedMethod - src/somefile.php:14 - Method Child::foo does not exist',
|
'error_message' => 'UndefinedMethod - src' . DIRECTORY_SEPARATOR . 'somefile.php:14 - Method Child::foo does not exist',
|
||||||
],
|
],
|
||||||
'annotationInvalidArg' => [
|
'annotationInvalidArg' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
@ -503,7 +503,7 @@ class MethodCallTest extends TestCase
|
|||||||
function f($p): void {
|
function f($p): void {
|
||||||
$p->zugzug();
|
$p->zugzug();
|
||||||
}',
|
}',
|
||||||
'error_message' => 'UndefinedInterfaceMethod - src/somefile.php:7 - Method (B&A)::zugzug does not exist'
|
'error_message' => 'UndefinedInterfaceMethod - src' . DIRECTORY_SEPARATOR . 'somefile.php:7 - Method (B&A)::zugzug does not exist'
|
||||||
],
|
],
|
||||||
'noInstanceCallAsStatic' => [
|
'noInstanceCallAsStatic' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
@ -615,7 +615,7 @@ class MethodSignatureTest extends TestCase
|
|||||||
class C implements I {
|
class C implements I {
|
||||||
public function foo(bool $b): void {}
|
public function foo(bool $b): void {}
|
||||||
}',
|
}',
|
||||||
'error_message' => 'MethodSignatureMismatch - src/somefile.php:6 - Method C::foo has more required',
|
'error_message' => 'MethodSignatureMismatch - src' . DIRECTORY_SEPARATOR . 'somefile.php:6 - Method C::foo has more required',
|
||||||
],
|
],
|
||||||
'inheritParamTypes' => [
|
'inheritParamTypes' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
@ -700,7 +700,7 @@ class SwitchTypeTest extends TestCase
|
|||||||
case 0:
|
case 0:
|
||||||
echo "I never get here";
|
echo "I never get here";
|
||||||
}',
|
}',
|
||||||
'error_message' => 'ParadoxicalCondition - src/somefile.php:7',
|
'error_message' => 'ParadoxicalCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:7',
|
||||||
],
|
],
|
||||||
'impossibleCaseValue' => [
|
'impossibleCaseValue' => [
|
||||||
'<?php
|
'<?php
|
||||||
@ -716,7 +716,7 @@ class SwitchTypeTest extends TestCase
|
|||||||
case "c":
|
case "c":
|
||||||
echo "impossible";
|
echo "impossible";
|
||||||
}',
|
}',
|
||||||
'error_message' => 'TypeDoesNotContainType - src/somefile.php:11',
|
'error_message' => 'TypeDoesNotContainType - src' . DIRECTORY_SEPARATOR . 'somefile.php:11',
|
||||||
],
|
],
|
||||||
'impossibleCaseDefault' => [
|
'impossibleCaseDefault' => [
|
||||||
'<?php
|
'<?php
|
||||||
@ -732,7 +732,7 @@ class SwitchTypeTest extends TestCase
|
|||||||
default:
|
default:
|
||||||
echo "impossible";
|
echo "impossible";
|
||||||
}',
|
}',
|
||||||
'error_message' => 'ParadoxicalCondition - src/somefile.php:11',
|
'error_message' => 'ParadoxicalCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:11',
|
||||||
],
|
],
|
||||||
'breakWithoutSettingVar' => [
|
'breakWithoutSettingVar' => [
|
||||||
'<?php
|
'<?php
|
||||||
@ -761,7 +761,7 @@ class SwitchTypeTest extends TestCase
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}',
|
}',
|
||||||
'error_message' => 'TypeDoesNotContainType - src/somefile.php:5 - string(InvalidArgumentException) cannot be identical to class-string',
|
'error_message' => 'TypeDoesNotContainType - src' . DIRECTORY_SEPARATOR . 'somefile.php:5 - string(InvalidArgumentException) cannot be identical to class-string',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1180,7 +1180,7 @@ class TemplateExtendsTest extends TestCase
|
|||||||
return new Foo();
|
return new Foo();
|
||||||
}
|
}
|
||||||
}',
|
}',
|
||||||
'error_message' => 'ImplementedReturnTypeMismatch - src/somefile.php:29 - The return type \'A\Bar\' for',
|
'error_message' => 'ImplementedReturnTypeMismatch - src' . DIRECTORY_SEPARATOR . 'somefile.php:29 - The return type \'A\Bar\' for',
|
||||||
],
|
],
|
||||||
'extendTemplateAndDoesNotOverrideWithWrongArg' => [
|
'extendTemplateAndDoesNotOverrideWithWrongArg' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
@ -1771,7 +1771,7 @@ class TemplateTest extends TestCase
|
|||||||
type($closure);
|
type($closure);
|
||||||
}
|
}
|
||||||
}',
|
}',
|
||||||
'error_message' => 'InvalidArgument - src/somefile.php:20 - Argument 1 of type expects string, callable(State):(T as mixed)&Foo provided',
|
'error_message' => 'InvalidArgument - src' . DIRECTORY_SEPARATOR . 'somefile.php:20 - Argument 1 of type expects string, callable(State):(T as mixed)&Foo provided',
|
||||||
],
|
],
|
||||||
'classTemplateAsIncorrectClass' => [
|
'classTemplateAsIncorrectClass' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
Loading…
Reference in New Issue
Block a user