From ac2b32a92b068cd3aa90ff71b3e3ff354946bf90 Mon Sep 17 00:00:00 2001 From: Richardas Kuchinskas Date: Thu, 6 Jun 2024 19:41:51 +0300 Subject: [PATCH] new tests for typeHints --- src/tests/checkers/typehint_test.go | 63 +++++++++++++++++++ .../testdata/quickfix/phpTypeHintApply.php | 32 ++++++++++ .../phpTypeHintApply.php.fix.expected | 32 ++++++++++ 3 files changed, 127 insertions(+) create mode 100644 src/tests/golden/testdata/quickfix/phpTypeHintApply.php create mode 100644 src/tests/golden/testdata/quickfix/phpTypeHintApply.php.fix.expected diff --git a/src/tests/checkers/typehint_test.go b/src/tests/checkers/typehint_test.go index c3103c5a5..7e6d044b8 100644 --- a/src/tests/checkers/typehint_test.go +++ b/src/tests/checkers/typehint_test.go @@ -139,3 +139,66 @@ function f2() { } linttest.RunFilterMatch(test, "typeHint") } + +func TestTypeHintToFunParam(t *testing.T) { + test := linttest.NewSuite(t) + test.AddFile(`