I've written a PHP CLI script that executes on a Continuous Integration environment. One of the things it does is it runs Protractor tests.
My plan was to get the built-in PHP 5.4's built-in web server to run in the background:
php -S localhost:9000 -t foo/ bar.php &
And then run protractor tests that will use localhost:9000
:
protractor ./test/protractor.config.js
However, PHP's built-in web server doesn't run as a background service. I can't seem to find anything that will allow me to do this with PHP.
Can this be done? If so, how? If this is absolutely impossible, I'm open to alternative solutions.