We present constraints on testing general relativity (GR) at cosmological scales using recent data sets and assess the impact of galaxy intrinsic alignment in the CFHTLenS lensing data on those constraints. We consider data from Planck temperature anisotropies, the galaxy power spectrum from the WiggleZ survey, weak-lensing tomography shear-shear cross-correlations from the CFHTLenS survey, integrated Sachs Wolfe-galaxy cross-correlations, and baryon acoustic oscillation data. We use three different parametrizations of modified gravity (MG), one that is binned in redshift and scale, a parametrization that evolves monotonically in scale but is binned in redshift, and a functional parametrization that evolves only in redshift. We present the results in terms of the MG parameters Q and Σ. We employ an intrinsic alignment model with an amplitude A CFHTLenS that is included in the parameter analysis. We find an improvement in the constraints on the MG parameters corresponding to a 40-53% increase on the figure of merit compared to previous studies, and GR is found consistent with the data at the 95% confidence level. The bounds found on A CFHTLenS are sensitive to the MG parametrization used, and the correlations between A CFHTLenS and MG parameters are found to be weak to moderate. For all three MG parametrizations A CFHTLenS is found to be consistent with zero when the whole lensing sample is used; however, when using the optimized early-type galaxy sample a significantly nonzero A CFHTLenS is found for GR and the scaleindependent MG parametrization. We find that the tensions observed in previous studies persist, and there is an indication that cosmic microwave background (CMB) data and lensing data prefer different values for MG parameters, particularly for the parameter Σ. The analysis of the confidence contours and probability distributions suggest that the bimodality found follows that of the known tension in the σ 8 parameter.