@group

@group

A test can be tagged as belonging to one or more groups using the @group annotation like this

use PHPUnit\Framework\TestCase;

class MyTest extends TestCase
{
    /**
     * @group specification
     */
    public function testSomething()
    {
    }

    /**
     * @group regresssion
     * @group bug2204
     */
    public function testSomethingElse()
    {
    }
}

Tests can be selected for execution based on groups using the --group and --exclude-group options of the command-line test runner or using the respective directives of the XML configuration file.

doc_PHPUnit
2016-10-16 15:37:31
Comments
Leave a Comment

Please login to continue.