Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from elliotchance/1.4/205-run-in-ci-mode
Run in CI mode
- Loading branch information
Showing
6 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Concise\Console\ResultPrinter; | ||
|
||
class CIResultPrinter extends DefaultResultPrinter | ||
{ | ||
protected $lastPercentage = -1; | ||
|
||
public function update() | ||
{ | ||
$percentage = $this->counter->getPercentage($this->getTestCount()); | ||
if ($percentage > $this->lastPercentage) { | ||
$this->write($this->getAssertionString()); | ||
$this->lastPercentage = $percentage; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
tests/Concise/Console/ResultPrinter/CIResultPrinterTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Concise\Console\ResultPrinter; | ||
|
||
use Concise\TestCase; | ||
|
||
class CIResultPrinterTest extends TestCase | ||
{ | ||
public function testUpdateCallsWrite() | ||
{ | ||
$resultPrinter = $this->niceMock('Concise\Console\ResultPrinter\CIResultPrinter') | ||
->expect('write') | ||
->get(); | ||
$resultPrinter->update(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule wiki
updated
from a57a69 to a4d3f2