]> git.koha-community.org Git - koha.git/commit
Bug 33967: Add unit test to ensure SetEnv doesn't compromise $env
authorDavid Cook <dcook@prosentient.com.au>
Fri, 9 Jun 2023 06:46:43 +0000 (06:46 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 12 Jul 2023 08:22:00 +0000 (09:22 +0100)
commitf73dbd00ad595a3d35e334902a2c3708da8c46ed
tree75e0a9b69e77b36518f20805343926c24cc2f651
parentb139047381b7ff61478155b301fbd69caffc1ddc
Bug 33967: Add unit test to ensure SetEnv doesn't compromise $env

This patch includes a unit test which checks the memory address
of the $env hashref in middlewares before and after
Koha::Middleware::Env is applied.

It succeeds when the same $env is maintained before and after
this middleware. It fails if the $env has been overwritten with
a new hashref (as evidenced by the new memory address for the
hash).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c7142fe940e7eed25afc814bb8afb017e5f90ea)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
t/Koha/Middleware/SetEnv.t [new file with mode: 0755]