Laravel\Lumen\Testing\TestCase::setUp PHP Method

setUp() public method

Setup the test environment.
public setUp ( ) : void
return void
    public function setUp()
    {
        if (!$this->app) {
            $this->refreshApplication();
        }
        $this->setUpTraits();
    }

Usage Example

Example #1
0
 /**
  * Setup the test environment.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $this->bootTraits();
     DB::connection()->beginTransaction();
     //start a new transaction
 }
All Usage Examples Of Laravel\Lumen\Testing\TestCase::setUp