An undercover Herrera opened the scoring for Mexico within two minutes of the opening whistle, turning into Crown of jesusthe corner at the second post.
Less than 90 seconds later, Mexico led 2-0 after Funes Mori took advantage of Hirving lozano‘s scuffed and shot Nigerian goalkeeper Stanley Nwabali.
Herrera added his second in the 52nd minute before Dos Santos ended the night with a controlled finish 12 minutes from time.
Mexico will face Curacao, El Salvador and a qualifier are in Group A when the Gold Cup group stage begins on July 10. Group B will see the United States, Martinique, Canada and a qualifying match; Costa Rica, Jamaica, Suriname and one qualifier are in Group C; and Grenada, Honduras, Panama and guest Qatar are in Group D.
The first two nations of each group advance. The final will take place on August 1 in Las Vegas.