Testing PHP API code
After writing PHP code to modify pattern instances, test the code to check that it works correctly.
Before you begin
About this task
Procedure
To test your user-defined pattern, see Testing a user-defined pattern. A new workspace is opened in which you
generate an instance of your user-defined pattern. After the pattern
instance is generated, check that your PHP code has worked correctly.
For example, if you write PHP code to remove files from a pattern
instance project, check that the files are deleted.
What to do next
- To change and retest your PHP code, repeat the following steps
until all your changes are complete. You can keep the test workspace
open and continue to change your code and generate pattern instances
without closing and relaunching the test workspace after each change:
- Edit the PHP code file in your main workspace and save the file.
- In the test workspace, generate a new instance of your user-defined pattern and check the results.
- To package and distribute your user-defined pattern, see Packaging and distributing pattern plug-ins.