I'd like to think that Cave Johnson is a professor at Penn State University, culling the student body for the next great Aperture Science minds. That would most likely explain why YouTuber kss5095 decided to build a fully functional Portal turret for his Advanced Mechatronics final project.
This is just a skeleton -- the familiar outer shell will be constructed last -- but it operates exactly as you'd imagine. It tracks movement via a webcam "eye," targets with a laser beam, then fires away. Real bullets have been exchanged for foam darts, but that's a reasonable substitution, I would think.