All-versus-nothing nonlocality test of quantum mechanics by two-photon hyperentanglement