Add two failings tests

This commit is contained in:
Stefan Blanke 2020-03-04 14:54:21 +01:00
parent 7502b6f891
commit 19d18c5a6a
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,42 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Routing\Annotation\Route;
class ClassWithTemplateAnnotationController
{
/**
* @Route("/show/{id}")
* @Method({"GET", "HEAD"})
* @Template("AdminBundle:Payment:create.html.twig")
*/
public function show($id)
{
}
}
?>
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Routing\Annotation\Route;
class ClassWithTemplateAnnotationController
{
/**
* @Route("/show/{id}", methods={"GET", "HEAD"})
* @Template("AdminBundle:Payment:create.html.twig")
*/
public function show($id)
{
}
}
?>

View File

@ -0,0 +1,42 @@
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Routing\Annotation\Route;
class ClassWithTemplateAnnotation2Controller
{
/**
* @Route("/show/{id}")
* @Template("AdminBundle:Payment:create.html.twig")
* @Method({"GET", "HEAD"})
*/
public function show($id)
{
}
}
?>
-----
<?php
namespace Rector\Symfony\Tests\Rector\ClassMethod\MergeMethodAnnotationToRouteAnnotationRector\Fixture;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Routing\Annotation\Route;
class ClassWithTemplateAnnotation2Controller
{
/**
* @Route("/show/{id}", methods={"GET", "HEAD"})
* @Template("AdminBundle:Payment:create.html.twig")
*/
public function show($id)
{
}
}
?>