[MethodArgumentChangerRector] add another test

This commit is contained in:
TomasVotruba 2017-10-14 21:51:32 +02:00
parent 909e25e715
commit 4e78e2283a
5 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,9 @@
rectors:
# dependency-injection
Rector\Rector\Dynamic\MethodArgumentChangerRector:
-
class: Symfony\Component\DependencyInjection\ContainerBuilder
method: addCompilerPass
position: 3
type: added
default_value: 0

View File

@ -44,6 +44,7 @@ final class Test extends TestCase
{
return [
[__DIR__ . '/wrong/wrong.php.inc', __DIR__ . '/correct/correct.php.inc'],
[__DIR__ . '/wrong/wrong2.php.inc', __DIR__ . '/correct/correct2.php.inc'],
];
}
}

View File

@ -6,3 +6,10 @@ rectors:
position: 0
type: added
default_value: false
-
class: Symfony\Component\DependencyInjection\ContainerBuilder
method: addCompilerPass
position: 3
type: added
default_value: 0

View File

@ -0,0 +1,10 @@
<?php declare(strict_types=1);
class SomeClass
{
public function create()
{
$containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder;
$containerBuilder->addCompilerPass('pass', 'type', 0);
}
}

View File

@ -0,0 +1,10 @@
<?php declare(strict_types=1);
class SomeClass
{
public function create()
{
$containerBuilder = new Symfony\Component\DependencyInjection\ContainerBuilder;
$containerBuilder->addCompilerPass('pass', 'type');
}
}