mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-14 20:39:43 +01:00
Merge pull request #3003 from stedekay/failing-tests-for-method-annotation
Add failing tests for method annotation
This commit is contained in:
commit
baa057d48b
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user