fixed bug where console coverage was showing up every time
This commit is contained in:
parent
175526841c
commit
d6faf4533e
@ -28,9 +28,7 @@
|
|||||||
* @uses getOption()
|
* @uses getOption()
|
||||||
*/
|
*/
|
||||||
protected function preRun() {
|
protected function preRun() {
|
||||||
parent::preRun();
|
if ($this->getOption('coverage-html') || $this->getOption('coverage-console')/* || $this->getOption('coverage-xml')*/) {
|
||||||
|
|
||||||
if ($this->getOption('coverage-html') !== null || $this->getOption('coverage-console') !== null/* || $this->getOption('coverage-xml')*/) {
|
|
||||||
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
|
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +51,7 @@
|
|||||||
protected function postRun() {
|
protected function postRun() {
|
||||||
$html = $this->getOption('coverage-html');
|
$html = $this->getOption('coverage-html');
|
||||||
$console = $this->getOption('coverage-console');
|
$console = $this->getOption('coverage-console');
|
||||||
if ($html !== null || $console !== null) {
|
if ($html || $console) {
|
||||||
$coverage = xdebug_get_code_coverage();
|
$coverage = xdebug_get_code_coverage();
|
||||||
xdebug_stop_code_coverage();
|
xdebug_stop_code_coverage();
|
||||||
if ($console !== null) {
|
if ($console !== null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user