The VIMOS Public Extragalactic Redshift Survey (VIPERS): Gravity test from the combination of redshift-space distortions and galaxy-galaxy lensing at 0.5 < z < 1.2