When the test is run for the first time, everything goes fine. But when you run it a second time, an error occurs PDOException: SQLSTATE[42701]: Duplicate column: 7 ERROR
use Illuminate\Http\UploadedFile;
use PluginTestCase;
class PostTest extends PluginTestCase
{
public function testCreateToken()
{
$file = UploadedFile::fake()->image('post.jpg');
$response = $this->post(
'/api/v1/post/create',
['file' => $file, 'name' => 'Main post', 'description' => 'Main post']
);
$response->assertStatus(200);
}
}