File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+ // Prevent direct access unless testing.
3
+ getenv ('PHP_CURL_CLASS_TEST_MODE_ENABLED ' ) === 'yes ' || exit;
2
4
3
5
require_once 'ContentRangeServer.php ' ;
4
6
require_once 'RangeHeader.php ' ;
Original file line number Diff line number Diff line change 40
40
fastcgi_pass=" 127.0.0.1:9000"
41
41
fi
42
42
43
+ # Let test server know we should allow testing.
44
+ export PHP_CURL_CLASS_TEST_MODE_ENABLED=" yes"
45
+
43
46
if [[ " ${TRAVIS_PHP_VERSION} " == " 5.3" ]]; then
44
47
if ! [ -x " $( command -v add-apt-repository) " ]; then
45
48
$superuser apt-get install -y python-software-properties
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ cd "${SCRIPT_DIR}"
3
3
4
4
set -x
5
5
6
+ # Let test server know we should allow testing.
7
+ export PHP_CURL_CLASS_TEST_MODE_ENABLED=" yes"
8
+
6
9
php -S 127.0.0.1:8000 -t PHPCurlClass/ & > /dev/null &
7
10
pid=" ${! } "
8
11
extra_args=" ${@ } "
You can’t perform that action at this time.
0 commit comments