Skip to content

Commit

Permalink
Merge pull request #5 from LimeDeck/issue#4
Browse files Browse the repository at this point in the history
Fixed issue with the Windows EOL
  • Loading branch information
jakubhomoly authored Jun 19, 2017
2 parents 20dca6f + 5229d05 commit e926b1a
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 📋 Detailed PHPUnit Printer

[![Build Status](https://travis-ci.org/LimeDeck/phpunit-detailed-printer.svg?branch=master)](https://travis-ci.org/LimeDeck/phpunit-detailed-printer)
[![Build Status: Linux](https://travis-ci.org/LimeDeck/phpunit-detailed-printer.svg?branch=master)](https://travis-ci.org/LimeDeck/phpunit-detailed-printer)
[![Build status: Windows](https://ci.appveyor.com/api/projects/status/656nmj6oxbnq4sri/branch/master?svg=true)](https://ci.appveyor.com/project/HRcc/phpunit-detailed-printer/branch/master)
[![GitHub release](https://img.shields.io/github/release/LimeDeck/phpunit-detailed-printer.svg)](https://github.com/limedeck/phpunit-detailed-printer)

## Installation
Expand Down
45 changes: 45 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
build: off
platform:
- x64
clone_folder: c:\projects\phpunit-detailed-printer
environment:
matrix:
- php_version: 5.6
- php_version: 7.0
- php_version: 7.1
## Cache composer, chocolatey and php bits
cache:
- '%LOCALAPPDATA%\Composer\files -> composer.lock'
- composer.phar
# Cache chocolatey packages
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
# Cache php install
- c:\tools\php -> .appveyor.yml
## Set up environment variables
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1 # This var is connected to PHP install cache
- SET ANSICON=121x90 (121x90)
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST c:\tools\php (SET PHP=0) # Checks for the PHP install being cached
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_version | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- cd c:\tools\php
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd c:\projects\phpunit-detailed-printer
- appveyor-retry composer install --no-progress --profile
- composer show

## Run the actual test
test_script:
- cd c:\projects\phpunit-detailed-printer
- vendor/bin/phpunit
4 changes: 2 additions & 2 deletions src/Printer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function writeProgress($progress)
$progress = static::$symbols[$progress];
}

$this->write("{$progress} {$this->testRow}");
$this->write("{$progress} {$this->testRow}" . PHP_EOL);
$this->column++;
$this->numTestsRun++;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ protected function writeProgressWithColor($color, $buffer)
protected function buildTestRow($className, $methodName, $time, $color = 'fg-white')
{
$this->testRow = sprintf(
"%s (%s)\n",
"%s (%s)",
$this->formatWithColor($color, "{$className}: {$this->formatMethodName($methodName)}"),
$this->formatTestDuration($time)
);
Expand Down
6 changes: 3 additions & 3 deletions tests/states-test.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ There was 1 error:
1) PrinterStatesTest::testError
strpos() expects at least 2 parameters, 0 given

%s/tests/_files/PrinterStatesTest.php:17
%sPrinterStatesTest.php:17

--

There was 1 warning:

1) PrinterStatesTest::testWarning

%s/tests/_files/PrinterStatesTest.php:27
%sPrinterStatesTest.php:27

--

Expand All @@ -48,7 +48,7 @@ There was 1 failure:
1) PrinterStatesTest::testFailure
Failed asserting that false is true.

%s/tests/_files/PrinterStatesTest.php:12
%sPrinterStatesTest.php:12

ERRORS!
Tests: 7, Assertions: 2, Errors: 1, Failures: 1, Warnings: 1, Skipped: 1, Incomplete: 1, Risky: 1.

0 comments on commit e926b1a

Please sign in to comment.