How to use the method setup from PHPUnit in Laravel 5.8
问题 I used to use the method setup of PHPUnit to create a instance for my test methods. But in Laravel 5.8 I can't do it I've tried both ways, and it's works makes an instance per method how showed below. This works: <?php namespace Tests\Unit; use Tests\TestCase; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Foundation\Testing\RefreshDatabase; use App\Service\MyService; class MyServiceTest extends TestCase { /** * A basic unit test example. * * @return void */ public function