100% of 56OPs |
100% of 4Lines |
100% of 3Branches |
100% of 3Paths |
| Method | OPs | OPs % | Lines | Line % | Branches | Branches % | Paths | Path % |
|---|---|---|---|---|---|---|---|---|
| mageekguy\atoum\report\fields\runner\result\notifier\terminal::getCommand() | 5 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
| mageekguy\atoum\report\fields\runner\result\notifier\terminal::setCallbackCommand() | 9 | 100% | 2 | 100% | 1 | 100% | 1 | 100% |
| mageekguy\atoum\report\fields\runner\result\notifier\terminal::send() | 42 | 100% | 1 | 100% | 1 | 100% | 1 | 100% |
| # | |
|---|---|
| 1 |
<?php |
| 2 |
|
| 3 |
namespace mageekguy\atoum\report\fields\runner\result\notifier; |
| 4 |
|
| 5 |
use |
| 6 |
mageekguy\atoum, |
| 7 |
mageekguy\atoum\report\fields\runner\result\notifier |
| 8 |
; |
| 9 |
|
| 10 |
class terminal extends notifier |
| 11 |
{
|
| 12 |
protected $callbackCommand = null; |
| 13 |
|
| 14 |
public function getCommand()100% |
| 15 |
{
|
| 16 |
return 'terminal-notifier -title %s -message %s -execute %s'; |
| 17 |
} |
| 18 |
|
| 19 |
public function setCallbackCommand($command)100% |
| 20 |
{
|
| 21 |
$this->callbackCommand = $command; |
| 22 |
|
| 23 |
return $this; |
| 24 |
} |
| 25 |
|
| 26 |
public function send($title, $message, $success)100% |
| 27 |
{
|
| 28 |
return $this->adapter->system(sprintf($this->getCommand(), escapeshellarg($title), escapeshellarg($message), escapeshellarg($this->callbackCommand))); |
| 29 |
} |
| 30 |
} |