From d50c7bb4122204aa3dbf5a5f8e7f799a961f1ede Mon Sep 17 00:00:00 2001 From: mscherer Date: Thu, 8 May 2025 12:49:05 +0200 Subject: [PATCH] assertRedirectBackToReferer() docs --- en/appendices/5-3-migration-guide.rst | 3 ++- en/development/testing.rst | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/en/appendices/5-3-migration-guide.rst b/en/appendices/5-3-migration-guide.rst index 50aa4e17de..b98b6d2ad0 100644 --- a/en/appendices/5-3-migration-guide.rst +++ b/en/appendices/5-3-migration-guide.rst @@ -57,4 +57,5 @@ Validation TestSuite --------- -- `assertRedirectBack()` added to assert a successful redirect has been made to the same previous URL. +- ``assertRedirectBack()`` added to assert a successful redirect has been made to the same previous URL. +- ``assertRedirectBackToReferer()`` added to assert a successful redirect has been made to the referer URL. diff --git a/en/development/testing.rst b/en/development/testing.rst index e9b50c6615..8162072e97 100644 --- a/en/development/testing.rst +++ b/en/development/testing.rst @@ -1512,6 +1512,9 @@ make testing responses much simpler. Some examples are:: // Check the Location header matches the same previous URL $this->assertRedirectBack(); + // Check the Location header matches the referer URL + $this->assertRedirectBackToReferer(); + // Check that no Location header has been set $this->assertNoRedirect();