mirror of
https://github.com/rectorphp/rector.git
synced 2024-09-06 15:41:59 +00:00
test(RequestStaticValidateToInjectRector): add test case for function
This commit is contained in:
parent
399a8ad549
commit
52e2b62f32
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Rector\Laravel\Tests\Rector\StaticCall\RequestStaticValidateToInjectRector\Fixture;
|
||||
|
||||
class SomeFunction2
|
||||
{
|
||||
public function store()
|
||||
{
|
||||
$validatedData = request('foo');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\Laravel\Tests\Rector\StaticCall\RequestStaticValidateToInjectRector\Fixture;
|
||||
|
||||
class SomeFunction2
|
||||
{
|
||||
public function store(\Illuminate\Http\Request $request)
|
||||
{
|
||||
$validatedData = $request->input('foo');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -9,7 +9,12 @@ final class RequestStaticValidateToInjectRectorTest extends AbstractRectorTestCa
|
||||
{
|
||||
public function test(): void
|
||||
{
|
||||
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/fixture-alias.php.inc', __DIR__ . '/Fixture/function.php.inc']);
|
||||
$this->doTestFiles([
|
||||
__DIR__ . '/Fixture/fixture.php.inc',
|
||||
__DIR__ . '/Fixture/fixture-alias.php.inc',
|
||||
__DIR__ . '/Fixture/function.php.inc',
|
||||
__DIR__ . '/Fixture/function2.php.inc',
|
||||
]);
|
||||
}
|
||||
|
||||
protected function getRectorClass(): string
|
||||
|
Loading…
Reference in New Issue
Block a user