Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8119393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:47:30+00:00 2026-06-06T04:47:30+00:00

I’ve been searching a solution for a while but couldn’t find any. I do

  • 0

I’ve been searching a solution for a while but couldn’t find any.

I do some code-coverage on my PHP application and it works fine except for a couple of files that PHPUnit seems to consider as empty (I mean, as there was no line of code) even though they are not empty (each one contain hundreds lines).

I can see the class and its methods but each function is considered to have 0 line (it says 0/0 100% coverage). If I try to click on function or classes names, I usually see the code but not for these problematic classes.

I’d like to post an image but as I’m a new user I unfortunately can’t.

Anyone got the same issue ?

Edit: Here is a sample class that has the issue:

1 http://img43.imageshack.us/img43/9127/screenshot1aig.png

Edit after solution found (2): I removed source code since it was not the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:47:31+00:00Added an answer on June 6, 2026 at 4:47 am

    I found a workaround guys. I did as proposed by cweiske (which I should have done earlier) and shrinked until the phpunit code coverage would work. But surprise, it never worked even though I left only one single method.

    I created another file “Foo.php”, containing the same content as PlayersManager (almost empty, only one function).

    An Foo.php was covered perfectly ! I copied the whole file I had from PlayersManager into Foo.php, ran the code coverage and it was working perfectly.

    Just to prove I’m not crazy, I recopied the code in PlayersManager and retried: PlayersManager coverage was still 100% with 0 line of code.

    I deleted PlayersManager.php and renamed Foo.php PlayersManager.php, reran the coverage and it works !

    Is phpunit keeping some cache or something like that !?

    Anyway the workaround will make it for other problematic files in future, but just wondering !

    Thanks for help !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.