@before

@before

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

use PHPUnit\Framework\TestCase;

class MyTest extends TestCase
{
    /**
     * @before
     */
    public function setupSomeFixtures()
    {
        // ...
    }

    /**
     * @before
     */
    public function setupSomeOtherFixtures()
    {
        // ...
    }
}
doc_PHPUnit
2016-10-16 15:37:29
Comments
Leave a Comment

Please login to continue.