1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Add test for a336d6c

This commit is contained in:
Matthew Brown 2016-10-01 22:47:50 -04:00
parent dd57a85f54
commit f3bedeb671

View File

@ -364,6 +364,19 @@ class ScopeTest extends PHPUnit_Framework_TestCase
$file_checker->check();
}
public function testPassByRefInIfCheckAfter()
{
$stmts = self::$_parser->parse('<?php
if (!preg_match("/bad/", "badger", $matches)) {
exit();
}
echo $matches[0];
');
$file_checker = new \Psalm\Checker\FileChecker('somefile.php', $stmts);
$file_checker->check();
}
public function testPassByRefInIfWithBoolean()
{
$stmts = self::$_parser->parse('<?php