Don't impersonate your manager, even if he asks you.
Ask your manager why he would prefer you take the test instead of him, and offer to help address that problem. (Treat the disease, not the symptoms.) If he finds the material too difficult to understand (perhaps because he doesn't have the relevant background), then offer to teach him or provide him self-study material. If he doesn't find the time to study, offer to temporarily take up some of his less critical responsibilities.
Most companies have a policy against this kind of impersonation, and silly as it might sound, your manager could be doing a "sting operation", as part of a compliance auditing. If you agree to impersonate him, he has evidence against you!1
Even if this isn't a sting operation, this impersonation is not only unethical but could also create problems. For instance, suppose your manager is deputed to work for a client who requires someone who has completed this certification, and they find out later that he did not take this test. When things get ugly (and for your own safety, assume they will), you would get caught up in the mess, and your manager may not cover for you then.
1 Anecdote A company I have worked for was very strict about its tailgating policy (client requirement). Employees would receive frequent admonitions through HR mass mailers, manager's instructions, notice board posters, etc. to never allow any person, not even your team member or manager, to enter the restricted areas without a valid ID badge.
Managers would sometimes pretend to have forgotten their ID badge (or a similar excuse) and plead with an employee to let them tailgate "since you know I work here anyway". Employees who directed them to the access control office "passed" the test, while those who complied with the request would be reprimanded by the same manager.