I may be misunderstanding, or perhaps I wasn't clear enough in my
explanation. The code coverage task is failing when it tries to set
up the database because of things like undefined indices. Naturally,
I would expect the warnings that show up during test execution to be
seen by XDebug as well, and if its a fatal error then the test (and
coverage) fails. But I would not expect XDebug to complain about
anything other than invalid syntax when setting up the coverage
database.
Mark
On Sep 6, 2007, at 6:22 AM, Derick Rethans wrote:
> On Tue, 4 Sep 2007, Mark Slater wrote:
>
>> Annoying problem: Our product is a web application. That means
>> that some
>> variables aren't filled in unless the code is in a web request.
>> But when I try
>> to have coverage reported over the whole product, it seems that
>> XDebug tries
>> to execute each line because it fails on things like:
>>
>> [PHP Error] Undefined index: SERVER_PORT [line # of /path/to/
>> file.php]
>>
>> Is there anyway to get around that? Our unit tests are intended
>> for offline
>> execution, but if XDebug is going to insist that all lines be
>> executable (even
>> ones our tests won't actually touch) then it severely reduces our
>> ability to
>> use it outside a rather limited set of files.
>
> Xdebug doesn't require anything to be done - in your unit tests PHP is
> run, and if PHP gives a warning, Xdebug will see it as well. In our
> Unittests we populate the $_SERVER global ourselves if our
> code-to-be-tested depends on it.
>
> regards,
> Derick
>
> --
> Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
Received on Fri Sep 07 2007 - 19:10:11 BST
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST