100% of 86OPs |
100% of 15Lines |
73% of 11Branches |
50% of 6Paths |
| Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
|---|---|---|---|---|---|---|---|---|
| mageekguy\atoum\asserters\output::__construct() | 22 | 100% | 3 | 100% | 1 | 0% | 1 | 100% |
| mageekguy\atoum\asserters\output::setWith() | 64 | 100% | 12 | 100% | 10 | 80% | 5 | 40% |
| # | |
|---|---|
| 1 |
<?php |
| 2 |
|
| 3 |
namespace mageekguy\atoum\asserters; |
| 4 |
|
| 5 |
use |
| 6 |
mageekguy\atoum, |
| 7 |
mageekguy\atoum\tools, |
| 8 |
mageekguy\atoum\asserter, |
| 9 |
mageekguy\atoum\asserters |
| 10 |
; |
| 11 |
|
| 12 |
class output extends asserters\phpString |
| 13 |
{
|
| 14 |
public function __construct(asserter\generator $generator = null, tools\variable\analyzer $analyzer = null, atoum\locale $locale = null)100% |
| 15 |
{
|
| 16 |
parent::__construct($generator, $analyzer, $locale); |
| 17 |
|
| 18 |
$this->setWith(null); |
| 19 |
} |
| 20 |
|
| 21 |
public function setWith($value = null, $charlist = null, $checkType = true)100% |
| 22 |
{
|
| 23 |
if ($value instanceof \closure) |
| 24 |
{
|
| 25 |
ob_start(); |
| 26 |
$value($this->getTest()); |
| 27 |
$value = ob_get_clean(); |
| 28 |
} |
| 29 |
else if ($value === null && ob_get_level() > 0) |
| 30 |
{
|
| 31 |
$value = ob_get_clean(); |
| 32 |
ob_start(); |
| 33 |
} |
| 34 |
|
| 35 |
return parent::setWith($value, $charlist, $checkType); |
| 36 |
} |
| 37 |
} |