Yes, foreign people who want to get spanish citizenship have now to take a language test, that’s what the new immigration spanish law includes, getting always more restrictive as time goes by…
The rules on accessing nationality are very different from one EU state to another, and during the last years Spain has been a kind of door to Europe, specially for immigrants coming from Latinamerica and North Africa.
Although with the arrival of the crisis many emigrants have returned to their origin countries (and many spanish young people have left the country to find a job abroad) the spanish conservative government has now included this linguistic test to get citizenship, in which requesters have to show a level A2 of spanish, according to european language standards and under supervision of the Instituto Cervantes. This mesure is supposed to guarantee a real integration of immigrants on spanish society.
Other of the requirements that the Spanish Civil Code sets are a 10-year residency before citizenship can be requested, (EU average is 6 years) and, basically having a job, wich is not so easy nowadays in Spain! The other option is to get married to a spanish person, which one do you think it’s easier? 😉