4 * This file is part of Psy Shell.
6 * (c) 2012-2018 Justin Hileman
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Psy\Test\CodeCleaner;
14 use Psy\CodeCleaner\CallTimePassByReferencePass;
16 class CallTimePassByReferencePassTest extends CodeCleanerTestCase
18 public function setUp()
20 $this->setPass(new CallTimePassByReferencePass());
24 * @dataProvider invalidStatements
25 * @expectedException \Psy\Exception\FatalErrorException
27 public function testProcessStatementFails($code)
29 $this->parseAndTraverse($code);
32 public function invalidStatements()
36 ['$object->method($first, &$arg)'],
37 ['$closure($first, &$arg, $last)'],
43 * @dataProvider validStatements
45 public function testProcessStatementPasses($code)
47 $this->parseAndTraverse($code);
48 $this->assertTrue(true);
51 public function validStatements()