98% of 57OPs |
100% of 8Lines |
80% of 10Branches |
100% of 5Paths |
| Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
|---|---|---|---|---|---|---|---|---|
| mageekguy\atoum\report\fields\runner\tap\plan::__construct() | 12 | 100% | 2 | 100% | 1 | 0% | 1 | 100% |
| mageekguy\atoum\report\fields\runner\tap\plan::__toString() | 15 | 100% | 1 | 100% | 5 | 100% | 2 | 100% |
| mageekguy\atoum\report\fields\runner\tap\plan::handleEvent() | 30 | 97% | 5 | 100% | 4 | 75% | 2 | 100% |
| # | |
|---|---|
| 1 |
<?php |
| 2 |
|
| 3 |
namespace mageekguy\atoum\report\fields\runner\tap; |
| 4 |
|
| 5 |
use |
| 6 |
mageekguy\atoum\runner, |
| 7 |
mageekguy\atoum\report |
| 8 |
; |
| 9 |
|
| 10 |
class plan extends report\field |
| 11 |
{
|
| 12 |
protected $testMethodNumber = 0; |
| 13 |
|
| 14 |
public function __construct()100% |
| 15 |
{
|
| 16 |
parent::__construct(array(runner::runStart)); |
| 17 |
} |
| 18 |
|
| 19 |
public function __toString()100% |
| 20 |
{
|
| 21 |
return ($this->testMethodNumber <= 0 ? '' : '1..' . $this->testMethodNumber . PHP_EOL); |
| 22 |
} |
| 23 |
|
| 24 |
public function handleEvent($event, \mageekguy\atoum\observable $observable)100% |
| 25 |
{
|
| 26 |
if (parent::handleEvent($event, $observable) === false) |
| 27 |
{
|
| 28 |
return false; |
| 29 |
} |
| 30 |
else |
| 31 |
{
|
| 32 |
$this->testMethodNumber = $observable->getTestMethodNumber(); |
| 33 |
|
| 34 |
return true; |
| 35 |
} |
| 36 |
} |
| 37 |
} |