before_script:
# Disable xdebug. NB: this should NOT be done for hhvm...
- - if [ $TRAVIS_PHP_VERSION != "hhvm" -a $TRAVIS_PHP_VERSION != "7.0" ]; then phpenv config-rm xdebug.ini; fi
+ - if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" ]; then phpenv config-rm xdebug.ini; fi
# We set up an Apache instance inside the Travis VM and test it.
- - if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then ./tests/ci/travis/setup_apache.sh; fi
- - if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
+ - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_apache.sh; fi
+ - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
- ./tests/ci/travis/setup_privoxy.sh
script:
# to have code coverage: --coverage-clover=coverage.clover
phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=gggeek.ssl.altervista.org HTTPSURI=/sw/xmlrpc/demo/server/server.php PROXY=localhost:8080
+after_failure:
+ - cat apache_error.log
+ - cat apache_access.log
+ - cat /tmp/hhvm.log
+
after_script:
- cat $TRAVIS_BUILD_DIR/apache_error.log $TRAVIS_BUILD_DIR/apache_access.log /tmp/hhvm.log
# # upload code-coverage to Scrutinizer
# - wget https://scrutinizer-ci.com/ocular.phar
# - php ocular.phar code-coverage:upload --format=php-clover coverage.clover
*/
public function echoInput()
{
- $r = new Response(new Value("'Aha said I: '" . $GLOBALS['HTTP_RAW_POST_DATA'], 'string'));
+ $r = new Response(new Value("'Aha said I: '" . file_get_contents('php://input'), 'string'));
print $r->serialize();
}