From d545c4d67104ba2357b051fb31e46fcbe2239238 Mon Sep 17 00:00:00 2001 From: andyexeter Date: Wed, 21 Jul 2021 13:07:34 +0100 Subject: [PATCH] Add FileLocator::locate stub and test --- src/Stubs/common/FileLocator.stubphp | 13 ++++++++ .../acceptance/acceptance/FileLocator.feature | 33 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/Stubs/common/FileLocator.stubphp create mode 100644 tests/acceptance/acceptance/FileLocator.feature diff --git a/src/Stubs/common/FileLocator.stubphp b/src/Stubs/common/FileLocator.stubphp new file mode 100644 index 0000000..0a1ec76 --- /dev/null +++ b/src/Stubs/common/FileLocator.stubphp @@ -0,0 +1,13 @@ +locate(__FILE__); + } + """ + When I run Psalm + Then I see no errors + + Scenario: FileLocator locate method return type should be `array` when third argument is false + Given I have the following code + """ + locate(__FILE__, null, false); + } + """ + When I run Psalm + Then I see no errors