DEV Community

williamDk
williamDk

Posted on

Answer: setUp/tearDown fixtures when unit testing in Laravel

Make sure that you are calling the parent setUp() and tearDown() first before you continue down. See code down here

public function setUp()
{
    parent::setUp();
    //$_SERVER['DOCUMENT_ROOT'] = dirname(__FILE__) . "/../..";
}

public function tearDown()
{
    parent::tearDown();
    //unset($_SERVER['DOCUMENT_ROOT']);
}

Top comments (0)