Symfony 4 - Functional Test - Client not following redirects though followRedirects is true

Asked
Active3 hr before
Viewed126 times

2 Answers

thoughsymfonyfunctional
90%

Meta Stack Overflow , Stack Overflow Public questions & answers , Stack Overflow help chat ,followRedirects is a setting. It is used for every request that is done afterwards.

so ... change

    $client - > request('GET', '/fr');
    $client - > followRedirects(true);
load more v
88%

In large test suites, it can make sense to create subdirectories for each type of tests (e.g. tests/Unit/ and test/Functional/).,The Client supports many operations that can be done in a real browser:, Types of Tests ,If your application behaves according to some HTTP headers, pass them as the second argument of createClient():

1
$ composer require--dev phpunit / phpunit symfony / test - pack
load more v

Other "though-symfony" queries related to "Symfony 4 - Functional Test - Client not following redirects though followRedirects is true"