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

adding DIRECTORY_SEPARATOR to tests that fail under windows

This commit is contained in:
SignpostMarv 2019-02-06 19:19:29 +00:00 committed by Matthew Brown
parent d45326759f
commit 4a56688800
7 changed files with 10 additions and 10 deletions

View File

@ -253,7 +253,7 @@ class BinaryOperationTest extends TestCase
'<?php
$a = gmp_init(2);
$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' => [
'<?php

View File

@ -434,7 +434,7 @@ class MagicMethodAnnotationTest extends TestCase
$child = new Child();
$child->getString();
$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' => [
'<?php

View File

@ -503,7 +503,7 @@ class MethodCallTest extends TestCase
function f($p): void {
$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' => [
'<?php

View File

@ -615,7 +615,7 @@ class MethodSignatureTest extends TestCase
class C implements I {
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' => [
'<?php

View File

@ -700,7 +700,7 @@ class SwitchTypeTest extends TestCase
case 0:
echo "I never get here";
}',
'error_message' => 'ParadoxicalCondition - src/somefile.php:7',
'error_message' => 'ParadoxicalCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:7',
],
'impossibleCaseValue' => [
'<?php
@ -716,7 +716,7 @@ class SwitchTypeTest extends TestCase
case "c":
echo "impossible";
}',
'error_message' => 'TypeDoesNotContainType - src/somefile.php:11',
'error_message' => 'TypeDoesNotContainType - src' . DIRECTORY_SEPARATOR . 'somefile.php:11',
],
'impossibleCaseDefault' => [
'<?php
@ -732,7 +732,7 @@ class SwitchTypeTest extends TestCase
default:
echo "impossible";
}',
'error_message' => 'ParadoxicalCondition - src/somefile.php:11',
'error_message' => 'ParadoxicalCondition - src' . DIRECTORY_SEPARATOR . 'somefile.php:11',
],
'breakWithoutSettingVar' => [
'<?php
@ -761,7 +761,7 @@ class SwitchTypeTest extends TestCase
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',
],
];
}

View File

@ -1180,7 +1180,7 @@ class TemplateExtendsTest extends TestCase
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' => [
'<?php

View File

@ -1771,7 +1771,7 @@ class TemplateTest extends TestCase
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' => [
'<?php