start(); while (!self::$httpServer->isRunning()) { usleep(1000); } } public static function tearDownAfterClass() { self::$httpServer->stop(); } protected static function getBaseUrl() { return 'http://localhost:8080'; } protected static function getRemoteImageUrl() { if (self::$httpServer) { return self::getBaseUrl() . '/images/new-php-logo.png'; } return 'http://php.net/images/logos/new-php-logo.png'; } protected static function getRemoteGifImageUrl() { if (self::$httpServer) { return self::getBaseUrl() . '/images/mario.gif'; } return 'http://php.net/images/logos/php-med-trans-light.gif'; } protected static function getRemoteBmpImageUrl() { if (self::$httpServer) { return self::getBaseUrl() . '/images/duke_nukem.bmp'; } return 'https://samples.libav.org/image-samples/RACECAR.BMP'; } }