PHP Unit Testing Tool: PHPUNIT in-depth usage (2 ). In the last PHP Unit test tool: PHPUNIT, we have a preliminary understanding of phpunit. in this article, we will continue to explain in depth some usage of phpunit. 1. mark
In the last PHP Unit test tool: PHPUNIT, we have a preliminary understanding of phpunit. in this article, we will continue to explain in depth some usage of phpunit.
1. markTestSkipped and markTestIncomplete
In phpunit, there are two useful methods: markTestSkipped and markTestIncomplete. They allow you to write unit tests not only with pass and failure results. MarkTestSkipped does not allow PHPUNIT to execute a written test method. For example, the following program:
Public function testThisMightHaveADb ()
{
$ MyObject-> createObject ();
Try {
$ Db = new Database ();
$ This-> assertTrue ($ db-> rowExists ());
Bytes. 1. mark...