Closed leberknecht closed 7 years ago
Hi, i'm confused about how to use the execute command:
execute
<?php // TestClass.php class TestClass { public function method1() { echo "method 1 triggered"; } public function method2() { echo "method 2 triggered"; return 'yeehaa'; } }
script:
<?php //script.php require_once 'TestClass.php'; $testClass = new TestClass(); $testClass->method1();
then i fire phpcov execute script.php --clover coverage.xml and the contents of the clover file is:
phpcov execute script.php --clover coverage.xml
<?xml version="1.0" encoding="UTF-8"?> <coverage generated="1497445956"> <project timestamp="1497445956"> <metrics files="0" loc="0" ncloc="0" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/> </project> </coverage>
i expected that method 1 will be covered..what am i missing here?
Uh, forgot: PHP 7.0.20-1~ubuntu16.04.1+deb.sury.org+1, xdebug v2.5.4
Ah, found that i'have to pass --whitelist
--whitelist
Refs https://github.com/sebastianbergmann/phpcov/pull/65
Hi, i'm confused about how to use the
execute
command:script:
then i fire
phpcov execute script.php --clover coverage.xml
and the contents of the clover file is:i expected that method 1 will be covered..what am i missing here?