diff --git a/bin/test-with-real-projects.sh b/bin/test-with-real-projects.sh index 7a388d5d5..44fdd3a83 100755 --- a/bin/test-with-real-projects.sh +++ b/bin/test-with-real-projects.sh @@ -26,6 +26,7 @@ collections) psl) git clone git@github.com:muglug/psl.git cd psl + git checkout 1.6.x composer install --ignore-platform-reqs ~/project/psalm --monochrome ;; diff --git a/tests/EndToEnd/PsalmEndToEndTest.php b/tests/EndToEnd/PsalmEndToEndTest.php index 380bf0db1..95058a553 100644 --- a/tests/EndToEnd/PsalmEndToEndTest.php +++ b/tests/EndToEnd/PsalmEndToEndTest.php @@ -115,9 +115,10 @@ class PsalmEndToEndTest extends TestCase { $this->runPsalmInit(1); $result = $this->runPsalm([], self::$tmpDir, true); + $this->assertStringContainsString('UnusedParam', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnType', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnStatement', $result['STDOUT']); - $this->assertStringContainsString('2 errors', $result['STDOUT']); + $this->assertStringContainsString('3 errors', $result['STDOUT']); $this->assertSame(2, $result['CODE']); } @@ -131,18 +132,20 @@ class PsalmEndToEndTest extends TestCase $this->runPsalmInit(1); $result = $this->runPsalm(['--diff', '-m'], self::$tmpDir, true); + $this->assertStringContainsString('UnusedParam', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnType', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnStatement', $result['STDOUT']); - $this->assertStringContainsString('2 errors', $result['STDOUT']); + $this->assertStringContainsString('3 errors', $result['STDOUT']); $this->assertStringContainsString('E', $result['STDERR']); $this->assertSame(2, $result['CODE']); $result = $this->runPsalm(['--diff', '-m'], self::$tmpDir, true); + $this->assertStringContainsString('UnusedParam', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnType', $result['STDOUT']); $this->assertStringContainsString('InvalidReturnStatement', $result['STDOUT']); - $this->assertStringContainsString('2 errors', $result['STDOUT']); + $this->assertStringContainsString('3 errors', $result['STDOUT']); $this->assertStringNotContainsString('E', $result['STDERR']); $this->assertSame(2, $result['CODE']); diff --git a/tests/fixtures/expected_taint_graph.dot b/tests/fixtures/expected_taint_graph.dot index 5d2f2869a..5d51dd358 100644 --- a/tests/fixtures/expected_taint_graph.dot +++ b/tests/fixtures/expected_taint_graph.dot @@ -1,10 +1,10 @@ digraph Taints { "$_GET:src/FileWithErrors.php:345" -> "$_GET['abc']-src/FileWithErrors.php:345-349" "$_GET['abc']-src/FileWithErrors.php:345-349" -> "coalesce-src/FileWithErrors.php:345-363" - "$s-src/FileWithErrors.php:109-110" -> "acme\sampleproject\bar" - "$s-src/FileWithErrors.php:162-163" -> "acme\sampleproject\baz" - "$s-src/FileWithErrors.php:215-216" -> "acme\sampleproject\bat" - "$s-src/FileWithErrors.php:269-270" -> "acme\sampleproject\bang" + "$s-src/FileWithErrors.php:109-110" -> "variable-use" -> "acme\sampleproject\bar" + "$s-src/FileWithErrors.php:162-163" -> "variable-use" -> "acme\sampleproject\baz" + "$s-src/FileWithErrors.php:215-216" -> "variable-use" -> "acme\sampleproject\bat" + "$s-src/FileWithErrors.php:269-270" -> "variable-use" -> "acme\sampleproject\bang" "acme\sampleproject\bang#1" -> "$s-src/FileWithErrors.php:269-270" "acme\sampleproject\bar#1" -> "$s-src/FileWithErrors.php:109-110" "acme\sampleproject\bat#1" -> "$s-src/FileWithErrors.php:215-216"