mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
cleanup tests
This commit is contained in:
parent
abc13cc352
commit
f2ba8acf1c
@ -33,7 +33,7 @@ final class GetParameterToConstructorInjectionRector extends AbstractRector
|
||||
*/
|
||||
private $getParameterAwareTypes = [
|
||||
'Symfony\Bundle\FrameworkBundle\Controller\Controller',
|
||||
'Symfony\Component\DependencyInjection\ContainerAwareInterface'
|
||||
'Symfony\Component\DependencyInjection\ContainerAwareInterface',
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
namespace SomeNamespace;
|
||||
|
||||
class ClassWithNamedService3 implements ContainerAwareInterface
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class ClassWithNamedService3 extends Controller
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
@ -14,9 +16,7 @@ class ClassWithNamedService3 implements ContainerAwareInterface
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
$this->renderTwig([
|
||||
'value' => $this->someParameter
|
||||
]);
|
||||
$value = $this->someParameter;
|
||||
|
||||
$query = new DoctrineQuery();
|
||||
$queryId = $query->getParameter('id');
|
||||
|
@ -24,7 +24,7 @@ final class GetParameterToConstructorInjectionRectorTest extends AbstractRectorT
|
||||
{
|
||||
return [
|
||||
[__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc'],
|
||||
// [__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'],
|
||||
[__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
namespace SomeNamespace;
|
||||
|
||||
class ClassWithNamedService3 implements ContainerAwareInterface
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class ClassWithNamedService3 extends Controller
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
$this->renderTwig([
|
||||
'value' => $this->container->getParameter('some_parameter')
|
||||
]);
|
||||
$value = $this->getParameter('some_parameter');
|
||||
|
||||
$query = new DoctrineQuery();
|
||||
$queryId = $query->getParameter('id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user