@after

@after

The @after annotation can be used to specify methods that should be called after each test method in a test case class.

use PHPUnit\Framework\TestCase;

class MyTest extends TestCase
{
    /**
     * @after
     */
    public function tearDownSomeFixtures()
    {
        // ...
    }

    /**
     * @after
     */
    public function tearDownSomeOtherFixtures()
    {
        // ...
    }
}
doc_PHPUnit
2016-10-16 15:37:28
Comments
Leave a Comment

Please login to continue.