Only the very early CD Players used sensors to detect the disc - they soon realised it wasn't needed. Instead when the draw closes, the laser tries to focus on the disc, if it can't focus then there's no disc, if it can focus, then there's a disc there. That's how they detect a disc. Once it's detected a disc then it will spin the disc, and try and read the TOC from it.
Just close the draw with no disc, and ensure the laser assembly moves up and down as it tries to focus on a disc - you might also be able to see the red light of the laser, but don't look too closely, as it can damage your eyes.