Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.

Writing tests

Tests skeletons generation

PHPEdit offers a set of commands to generate automatically test skeletons. You can access them by right-clicking inside a method or a class in the code. You can either go to the test method if there's already one:

Or you can create the first test:

Or create a new test method for a method that is already tested:

In that case, you will be asked what suffix should be appended to the test method's name:

And the test method is generated:

You can also create tests from the Solution Explorer:

and from the Code Browser:

Writing the test code

Once the skeleton is generated, you can write your test's code normally. If you put the PHPUnit framework in the dependencies (in the project, or in the include path for example), you will get Code Insight, Code Hint etc... to assist you:

Statistics

PHPEdit shows you the percentage of tested methods in your project, in the Solution Explorer and in the Code Browser: