How to Simulate HTTP Authentication in a Functional Test

Caution

注意

Starting from Symfony 5.1, a loginUser() method was introduced to ease testing secured applications. See Testing for more information about this.

Symfony 5.1 から、保護されたアプリケーションのテストを容易にする loginUser() メソッドが導入されました。これについての詳細は、テストを参照してください。

If you are still using an older version of Symfony, view previous versions of this article for information on how to simulate HTTP authentication.

古いバージョンの Symfony をまだ使用している場合は、HTTP 認証をシミュレートする方法について、この記事の以前のバージョンを参照してください。