spec\Sylius\Bundle\GridBundle\Renderer\TwigGridRendererSpec::it_uses_twig_to_render_the_action PHP Метод

it_uses_twig_to_render_the_action() публичный Метод

public it_uses_twig_to_render_the_action ( Twig_Environment $twig, Sylius\Component\Grid\View\GridViewInterface $gridView, Sylius\Component\Grid\Definition\Action $action )
$twig Twig_Environment
$gridView Sylius\Component\Grid\View\GridViewInterface
$action Sylius\Component\Grid\Definition\Action
    function it_uses_twig_to_render_the_action(\Twig_Environment $twig, GridViewInterface $gridView, Action $action)
    {
        $action->getType()->willReturn('link');
        $action->getOptions()->willReturn([]);
        $twig->render('SyliusGridBundle:Action:_link.html.twig', ['grid' => $gridView, 'action' => $action, 'data' => null])->willReturn('<a href="#">Action!</a>');
        $this->renderAction($gridView, $action)->shouldReturn('<a href="#">Action!</a>');
    }