Skip to content

Test failures with PHPStan dev-master #50

Closed
@ondrejmirtes

Description

@ondrejmirtes

Hi @eiriksm, after your latest changes in phpstan-src, there are now failures in this repo:

1) PHPStan\Rules\Deprecations\CallToDeprecatedMethodRuleTest::testDeprecatedMethodCall
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 '07: Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Foo.
+10: Call to deprecated method deprecatedFoo() of class CheckDeprecatedMethodCall\Bar.
 11: Call to deprecated method deprecatedFoo2() of class CheckDeprecatedMethodCall\Foo.
 14: Call to deprecated method deprecatedFooFromTrait() of class CheckDeprecatedMethodCall\Foo.
 15: Call to deprecated method deprecatedWithDescription() of class CheckDeprecatedMethodCall\Foo:
 Call a different method instead.
 '

phar:///home/runner/work/phpstan/phpstan/extension/vendor/phpstan/phpstan/phpstan.phar/src/Testing/RuleTestCase.php:84
/home/runner/work/phpstan/phpstan/extension/tests/Rules/Deprecations/CallToDeprecatedMethodRuleTest.php:23

2) PHPStan\Rules\Deprecations\CallToDeprecatedStaticMethodRuleTest::testDeprecatedStaticMethodCall
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
 '06: Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.
+08: Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Bar.
 09: Call to deprecated method deprecatedFoo2() of class CheckDeprecatedStaticMethodCall\Foo.
 11: Call to method foo() of deprecated class CheckDeprecatedStaticMethodCall\Foo.
 12: Call to method deprecatedFoo() of deprecated class CheckDeprecatedStaticMethodCall\Foo.
@@ @@
 Do not touch this at all.
 16: Call to deprecated method deprecatedWithDescription() of class CheckDeprecatedStaticMethodCall\Foo:
 This is probably a singleton.
-24: Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.
 '

Can you please look into it so we know what needs fixing? If the tests asserts here are reasonable then phpstan-src needs fixing, or these asserts need to be edited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions