Skip to content

Bug With Whitelist #476

@GinoPane

Description

@GinoPane

Hello.
Recently I had an issue with 0 code coverage on the project running on Mac Os, whilst everything was fine on Windows.

The reason was in case-sentivity of unix-like systems. But the whitelist still accepts directories with wrong names:
image
I've var-dumped in CodeCoverage/Filter:

   /**
     * Returns whether this filter has a whitelist.
     *
     * @return bool
     */
    public function hasWhitelist()
    {
        var_dump($this->whitelistedFiles); die();
        return !empty($this->whitelistedFiles);
    }

I think, whitelist should not accept such directories and it would be better to show an error, like the whitelist is empty. Because later it falls into zero percent code coverage, though no errors are shown:

image

P.S. Though, file_exists for this files also returns true, then maybe code coverage skips these files somewhere later, because if I change directories' names in the whitelist to capitalised names, then everything works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions