Technically, you can drive with two feet on a driving test—no law states otherwise. Doing so shouldn’t cause you to fail your test.
However, driving instructors and examiners will tell you that driving with two feet is a terrible idea. With one foot on the brake and one on the gas, you could run into a host of problems, including:
Being unstable when you press either pedal
Accidentally pressing the gas or brake when you wanted to press the other
Sudden, unintended braking or acceleration
Poor fuel economy due to “riding the brake” by keeping continual but slight pressure on the brakes, which also wears down the brake pads faster
That said, there is one case when driving with two feet is entirely necessary: if you drive a manual car. Manual transmissions require your left foot to push the clutch while the right foot controls the brake or accelerator.
While you might feel more comfortable using two feet to drive a car with an automatic transmission, avoid the urge to do so. You’ll have more control driving with one foot and therefore a better chance of passing your driving test.