mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
Add namespaced function call test
This commit is contained in:
parent
1db0b88115
commit
2783013a5b
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Tests\FunctionToStaticCallRector;
|
||||
|
||||
class SomeClass
|
||||
{
|
||||
public function someMethod()
|
||||
{
|
||||
\AnotherStaticClass::render('template', []);
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ final class FunctionToMethodCallRectorTest extends AbstractRectorTestCase
|
||||
public function provideWrongToFixedFiles(): Iterator
|
||||
{
|
||||
yield [__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc'];
|
||||
yield [__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'];
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Tests\FunctionToStaticCallRector;
|
||||
|
||||
class SomeClass
|
||||
{
|
||||
public function someMethod()
|
||||
{
|
||||
\SomeNamespaced\view('template', []);
|
||||
}
|
||||
}
|
@ -2,3 +2,4 @@ services:
|
||||
Rector\Rector\Function_\FunctionToStaticCallRector:
|
||||
$functionToMethodCall:
|
||||
'view': ['SomeStaticClass', 'render']
|
||||
'SomeNamespaced\view': ['AnotherStaticClass', 'render']
|
||||
|
Loading…
x
Reference in New Issue
Block a user