Hello,

is there a way to be sure that you not missed to test some function? I want to test lets say all posible functions, but it lot of them and you might easily miss.

It would be good to get notices or something like that on which functions has not been tested.

Maybe I need to cound methods of class and then count methods of test class. But maybe there is a better way.

There may be tools to do this, but you can also grep all your files and extract the lines containing the function keyword.

here may be tools to do this, but y

thanks, might be good idea

If you are using PHPUnit, then looking at the code coverage reports would be your best bet. These will show you down to the line what your tests are actually covering.

Actually counting the number of methods is pointless as in a well tested solution you'll have significantly more tests than you will actual methods in your classes.

Now I am not using PHPUnit, I just use native codeigniters unit test library. There are reports which show the tests, you can name them, and I name them using tested function names.

I now use the same amount of test methods - for one method there is one test method. Sometimes in the same test method I test few cases.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.