芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/laravel/jetstream/stubs/tests/livewire/CreateApiTokenTest.php
markTestSkipped('API support is not enabled.'); } $this->actingAs($user = User::factory()->withPersonalTeam()->create()); Livewire::test(ApiTokenManager::class) ->set(['createApiTokenForm' => [ 'name' => 'Test Token', 'permissions' => [ 'read', 'update', ], ]]) ->call('createApiToken'); $this->assertCount(1, $user->fresh()->tokens); $this->assertEquals('Test Token', $user->fresh()->tokens->first()->name); $this->assertTrue($user->fresh()->tokens->first()->can('read')); $this->assertFalse($user->fresh()->tokens->first()->can('delete')); } }