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

Commit

Permalink
Run tests without phpdbg
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Dec 5, 2019
1 parent 7c432e1 commit 56225ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
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

0 comments on commit 56225ce

Please sign in to comment.