for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LAG\AdminBundle\Tests\AdminBundle\Action\Responder;
use LAG\AdminBundle\Action\Configuration\ActionConfiguration;
use LAG\AdminBundle\Action\Responder\ListResponder;
use LAG\AdminBundle\Admin\AdminInterface;
use LAG\AdminBundle\Tests\AdminTestBase;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\RouterInterface;
use Twig_Environment;
class ListResponderTest extends AdminTestBase
{
public function testRespondWithSave()
$routing = $this->getMockWithoutConstructor(RouterInterface::class);
$configuration = $this->getMockWithoutConstructor(ActionConfiguration::class);
$admin = $this->getMockWithoutConstructor(AdminInterface::class);
$form = $this->getMockWithoutConstructor(FormInterface::class);
$filterForm = $this->getMockWithoutConstructor(FormInterface::class);
$filterForm
->expects($this->atLeastOnce())
->method('createView')
;
$twig = $this->getMockWithoutConstructor(Twig_Environment::class);
$responder = new ListResponder($routing, $twig);
$response = $responder->respond(
$configuration,
$admin,
$form,
);
$this->assertInstanceOf(Response::class, $response);
}