Last night my computer restarted without my input. When it was coming back up, it got to a point a little more than half way through, then stopped. I tried numerous times to restart, but with the same results. I tried doing the Apple Hardware Test (my computer is pre-2013) and my computer ignored the command to carry out the AHT. I recently installed the El Capitan OS. Is there a connection to my computer's recent irrational behavior? Also, prior to this instance, my computer had restarted itself without my input several times.
MacBook
Pro, OS X El Capitan (10.11)