Bugzilla – Attachment 122496 Details for
Bug 28615
Add a simple way to mock Koha::Logger
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28615: (follow-up) Newer Test::MockModule forbid ->mock
Bug-28615-follow-up-Newer-TestMockModule-forbid--m.patch (text/plain), 967 bytes, created by
Tomás Cohen Arazi (tcohen)
on 2021-06-29 15:30:06 UTC
(
hide
)
Description:
Bug 28615: (follow-up) Newer Test::MockModule forbid ->mock
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-06-29 15:30:06 UTC
Size:
967 bytes
patch
obsolete
>From ec382b926ce238f4d19675ae12fd41016cca8584 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 29 Jun 2021 11:18:12 -0300 >Subject: [PATCH] Bug 28615: (follow-up) Newer Test::MockModule forbid ->mock > >In strict mode, ->mock is forbidden and ->redefine needs to be used >instead. I tested this on buster to see if it breaks something, but it >doesn't. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/lib/Mocks/Logger.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/t/lib/Mocks/Logger.pm b/t/lib/Mocks/Logger.pm >index 8950d26a97..ff4bdb3ea9 100644 >--- a/t/lib/Mocks/Logger.pm >+++ b/t/lib/Mocks/Logger.pm >@@ -48,7 +48,7 @@ sub new { > my $mocked_logger_class = Test::MockModule->new("Koha::Logger"); > my $mocked_logger = Test::MockObject->new(); > >- $mocked_logger_class->mock( >+ $mocked_logger_class->redefine( > 'get', > sub { > return $mocked_logger; >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28615
:
122306
|
122307
|
122480
|
122481
|
122484
|
122485
|
122488
|
122489
| 122496 |
122497