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:
parent
dd57a85f54
commit
f3bedeb671
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user