try{ $serializer->encode( $this->getIntField(), EntityExistence::createEmpty(), $data, $this->getWriteParameterBagMock() )->current(); }catch(WriteConstraintViolationException $e){ static::assertSame('/count', $e->getViolations()->get(0)->getPropertyPath()); /* Unexpected language has to be fixed NEXT-9419 */ // static::assertSame('This value should not be blank.', $e->getViolations()->get(0)->getMessage());
throw$e; } }