Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Fixing tests environemnt... #188

Merged
merged 3 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ cache:
directories:
- $HOME/.composer/cache

before_install:
- phpenv config-rm xdebug.ini || echo "xdebug is not installed"

install:
- travis_retry composer self-update && composer --version
- export PATH="$HOME/.composer/vendor/bin:$PATH"
Expand All @@ -43,7 +40,7 @@ before_script:
fi

script:
- phpdbg -qrr vendor/bin/phpunit --verbose $PHPUNIT_COVERAGE_FLAG
- vendor/bin/phpunit --verbose $PHPUNIT_COVERAGE_FLAG
- |
if [ $TASK_STATIC_ANALYSIS == 1 ]; then
composer phan
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit bootstrap="tests/bootstrap.php"
backupGlobals="true"
colors="true"
verbose="true"
failOnRisky="true"
Expand Down
6 changes: 3 additions & 3 deletions tests/Emitter/HTTPFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public static function reset(): void
*/
public static function header(string $string, bool $replace = true, ?int $http_response_code = null): void
{
if (substr($string, 0, 5) !== 'HTTP/') {
$header = strtolower(explode(':', $string)[0]);
if ($replace || !key_exists($header, self::$headers)) {
if (strpos($string, 'HTTP/') !== 0) {
$header = strtolower(explode(':', $string, 2)[0]);
if ($replace || !array_key_exists($header, self::$headers)) {
self::$headers[$header] = [];
}
self::$headers[$header][] = $string;
Expand Down