View Issue Details

IDProjectCategoryView StatusLast Update
0001469XdebugCode Coveragepublic2017-09-20 20:42
ReporterAlexey Assigned Toderick  
PriorityimmediateSeverityblockReproducibilityalways
Status resolvedResolutionduplicate 
Summary0001469: If a function call is splitted into multiple lines then arguments are counted as not covered by tests
Description

If a function call is splitted into multiple lines then arguments are counted as not covered by tests.

We have to format our code, it's vital.

Steps To Reproduce

<?php
class Ololo
{
public function omg($a, $b, $c, $d, $e)
{
$a + $b + $c;
}
}
xdebug_start_code_coverage();
$lang_id = $source = $lexemes_ids = $deadline_ts = $skip_lexem_ids = 1;
$Obj = new Ololo();
$Obj->omg(
$lang_id,
$source,
$lexemes_ids,
$deadline_ts,
$skip_lexem_ids
);
$coverage = xdebug_get_code_coverage()[FILE];
xdebug_stop_code_coverage();
$lines = file(FILE);
foreach ($lines as $idx => $l) {
echo (isset($coverage[$idx + 1]) ? "\e[32m" : "\e[31m") . "$idx:$l";
}
print_r($coverage);

TagsNo tags attached.
Operating System
PHP Version

Relationships

duplicate of 0001467 resolvedderick If a function call is splitted into multiple lines then arguments are counted as not covered by tests 

Activities

derick

2017-09-20 20:42

administrator   ~0004414

Duplicate of 0001467

Issue History

Date Modified Username Field Change
2017-09-11 14:38 Alexey New Issue
2017-09-20 20:42 derick Note Added: 0004414
2017-09-20 20:42 derick Relationship added duplicate of 0001467
2017-09-20 20:42 derick Status new => resolved
2017-09-20 20:42 derick Resolution open => duplicate
2017-09-20 20:42 derick Assigned To => derick