public function testSupports() { $converter = $this->getConverter(['fail_on_validation_error' => true, 'validation_errors_argument' => 'testValidationErrors']); $configuration = $this->getConfiguration(); $this->requestBodyConverter->method('supports')->willReturn(true); $this->assertTrue($converter->supports($configuration)); }
/** * @param Serializer $serializer * @param EntityManager $em * @param ValidatorInterface $validator * @param EventDispatcherInterface $dispatcher */ public function __construct(Serializer $serializer, EntityManager $em, ValidatorInterface $validator, EventDispatcherInterface $dispatcher) { parent::__construct($serializer, null, null, $validator, 'error'); $this->em = $em; $this->dispatcher = $dispatcher; }
/** * @param Serializer $serializer * @param DocumentManager $documentManager * @param ValidatorInterface $validator * @param EventDispatcherInterface $dispatcher */ public function __construct(Serializer $serializer, DocumentManager $documentManager, ValidatorInterface $validator, EventDispatcherInterface $dispatcher) { parent::__construct($serializer, null, null, $validator, 'error'); $this->dm = $documentManager; $this->dispatcher = $dispatcher; }
public function testSupportsWithNoClass() { $converter = new RequestBodyParamConverter($this->serializer); $this->assertFalse($converter->supports($this->createConfiguration(null, 'post'))); }