DynamicRector tests: add arguments

This commit is contained in:
TomasVotruba 2018-03-03 09:51:42 +01:00
parent 5ecd2e4d5c
commit 53e3e68231
11 changed files with 75 additions and 63 deletions

View File

@ -1,4 +1,6 @@
services:
Rector\Rector\Dynamic\AnnotationReplacerRector:
arguments:
$classToAnnotationMap:
PHPUnit\Framework\TestCase:
scenario: test

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\ArgumentReplacerRector:
$argumentChangesByMethodAndType:
# added default value
-
class: 'Symfony\Component\DependencyInjection\ContainerBuilder'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\ClassConstantReplacerRector:
$oldToNewConstantsByClass:
'Symfony\Component\Form\FormEvents':
'PRE_BIND': 'PRE_SUBMIT'
'BIND': 'SUBMIT'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\ClassReplacerRector:
$oldToNewClasses:
OldClass: NewClass
'PhpParser\BuilderAbstract': 'PhpParser\Builder'
'Twig_Extension': 'Twig\Extension\AbstractExtension'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\MethodNameReplacerRector:
$perClassOldToNewMethods:
'Symfony\Component\Form\AbstractType':
'setDefaultOptions': 'configureOptions'
'Nette\Utils\Html':

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\NamespaceReplacerRector:
$oldToNewNamespaces:
'OldNamespace': 'NewNamespace'
'OldNamespaceWith\OldSplitNamespace': 'NewNamespaceWith\NewSplitNamespace'
'Old\Long\AnyNamespace': 'Short\AnyNamespace'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\ParentTypehintedArgumentRector:
$typehintForArgumentByMethodAndClass:
'PhpParser\Parser':
'parse':
'code': 'string'

View File

@ -1,4 +1,5 @@
services:
Rector\Rector\Dynamic\PropertyNameReplacerRector:
$perClassOldToNewProperties:
'SomeClass':
'oldProperty': 'newProperty'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\PropertyToMethodRector:
$perClassOldToNewProperties:
'Translator':
'locale':
'get': 'getLocale'

View File

@ -1,5 +1,6 @@
services:
Rector\Rector\Dynamic\PseudoNamespaceToNamespaceRector:
$configuration:
- 'PHPUnit_'
# exclude this class
- '!PHPUnit_Framework_MockObject_MockObject'

View File

@ -1,3 +1,4 @@
services:
Rector\Rector\Dynamic\ValueObjectRemoverRector:
$valueObjectsToSimpleTypes:
'SomeNamespace\SomeValueObject': 'string'