4 (maybe 6) large flat head screws hold it down. 2 will be on the firewall the rest will be on the floor. There is a lip around the actual doghouse that they attach to. You need a really large flathead screwdriver to remove the rather large screws or there is a special tool for it. The screws are the same as the ones for the step so you can check your house batteries.
But why do you need to remove the doghouse for a smog test?
It's been a long long time since I've had to do one but thought they just check the exhaust output with a test probe.