100% of 72OPs |
100% of 3Lines |
100% of 5Branches |
100% of 2Paths |
| Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
|---|---|---|---|---|---|---|---|---|
| mageekguy\atoum\report\fields\runner\tests\memory\phing::__toString() | 72 | 100% | 3 | 100% | 5 | 100% | 2 | 100% |
| # | |
|---|---|
| 1 |
<?php |
| 2 |
|
| 3 |
namespace mageekguy\atoum\report\fields\runner\tests\memory; |
| 4 |
|
| 5 |
use |
| 6 |
mageekguy\atoum, |
| 7 |
mageekguy\atoum\locale, |
| 8 |
mageekguy\atoum\cli\prompt, |
| 9 |
mageekguy\atoum\cli\colorizer, |
| 10 |
mageekguy\atoum\report |
| 11 |
; |
| 12 |
|
| 13 |
class phing extends report\fields\runner\tests\memory\cli |
| 14 |
{
|
| 15 |
public function __toString()100% |
| 16 |
{
|
| 17 |
$title = $this->locale->__('Total test memory usage', 'Total tests memory usage', $this->testNumber);
|
| 18 |
$memory = ($this->value === null ? $this->locale->_('unknown') : sprintf($this->locale->_('%4.2f Mb'), $this->value / 1048576));
|
| 19 |
|
| 20 |
return $this->prompt . sprintf($this->locale->_('%s: %s.'), $this->titleColorizer->colorize($title), $this->memoryColorizer->colorize($memory));
|
| 21 |
} |
| 22 |
} |