MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001468XdebugCode Coveragepublic2017-09-11 15:252017-09-20 21:42
ReporterAlexey 
Assigned Toderick 
PriorityimmediateSeverityblockReproducibilityalways
StatusresolvedResolutionduplicate 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001468: If a function call is splitted into multiple lines then arguments are counted as not covered by tests
DescriptionIf 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
Attached Files

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

-  Notes
(0004413)
derick (administrator)
2017-09-20 21:42

Duplicate of 0001467.

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


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker