A DOT rating is done by the manufacturer. The empty shell of the helmet  needs to withstand a 10 foot drop fall, and it has to cover the head.  That is it. 
It is not enough because the results of a DOT test are conducted in  house and are not done with any oversight by the DOT itself. They are  only randomly independently verified. So if you trust the manufacturer,  and it is a major brand, a DOT rating might be safe, but again maybe  not. There is just no way to know.
The part of the helmet that really protects your head is the foam on the  inside of the helmet and that is not tested in a DOT test. It is the  foam that compresses to take the brunt of the impact to your skull. A  SNELL rated interior has been crush tested to be sure that it is the  correct consistency to take the impact..... Too soft and your head will  take a hit against the shell, too hard and your going to hurt your  brain.
SNELL is a test done independently of the helmet maker, and the test is  done on the shell AND on the liner and foam. Anything less than a SNELL  rating and you are taking a chance that the helmet will not do all it  can.
ECE is the Euro version of DOT, but it is slightly more tough to pass.  In addition to a drop test, they to a flex and pressure test for ECE.  Unlike DOT, ECE is also independently done from the helmet maker.