Bugzilla – Attachment 47680 Details for
Bug 14751
Allow C4::Context->interface to be set to 'sip' or 'commandline'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14751: [QA Follow-up] Unit tests for interface method
Bug-14751-QA-Follow-up-Unit-tests-for-interface-me.patch (text/plain), 2.21 KB, created by
Marcel de Rooy
on 2016-02-05 08:45:12 UTC
(
hide
)
Description:
Bug 14751: [QA Follow-up] Unit tests for interface method
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-02-05 08:45:12 UTC
Size:
2.21 KB
patch
obsolete
>From a46295a169a45785007db89c838d723b8519c78b Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 5 Feb 2016 09:40:49 +0100 >Subject: [PATCH] Bug 14751: [QA Follow-up] Unit tests for interface method >Content-Type: text/plain; charset=utf-8 > >Added some descriptions in Context.t and added two tests for sip >and commandline. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/Context.t | 25 ++++++++++++++----------- > 1 file changed, 14 insertions(+), 11 deletions(-) > >diff --git a/t/Context.t b/t/Context.t >index 8febdb4..e2c1825 100755 >--- a/t/Context.t >+++ b/t/Context.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > use DBI; >-use Test::More tests => 24; >+use Test::More tests => 26; > use Test::MockModule; > > BEGIN { >@@ -49,13 +49,16 @@ is(C4::Context::db_scheme2dbi(), 'mysql', 'ask for nothing, get mysql'); > # C4::Context::interface > my $lastwarn; > local $SIG{__WARN__} = sub { $lastwarn = $_[0] }; >-is(C4::Context->interface, 'opac'); >-is(C4::Context->interface('foobar'), 'opac'); >-like($lastwarn, qr/invalid interface : 'foobar'/); >-is(C4::Context->interface, 'opac'); >-is(C4::Context->interface('intranet'), 'intranet'); >-is(C4::Context->interface, 'intranet'); >-is(C4::Context->interface('foobar'), 'intranet'); >-is(C4::Context->interface, 'intranet'); >-is(C4::Context->interface('OPAC'), 'opac'); >-is(C4::Context->interface, 'opac'); >+is(C4::Context->interface, 'opac','interface defaults to opac'); >+is(C4::Context->interface('foobar'), 'opac', 'interface foobar'); >+like($lastwarn, qr/invalid interface : 'foobar'/, 'interface warn on foobar'); >+is(C4::Context->interface, 'opac', 'interface still opac'); >+is(C4::Context->interface('intranet'), 'intranet', 'interface intranet'); >+is(C4::Context->interface, 'intranet', 'interface still intranet'); >+is(C4::Context->interface('foobar'), 'intranet', 'interface foobar again'); >+is(C4::Context->interface, 'intranet', 'interface still intranet'); >+is(C4::Context->interface('OPAC'), 'opac', 'interface OPAC uc'); >+is(C4::Context->interface, 'opac', 'interface still opac'); >+#Bug 14751 >+is( C4::Context->interface( 'SiP' ), 'sip', 'interface SiP' ); >+is( C4::Context->interface( 'COMMANDLINE' ), 'commandline', 'interface commandline uc' ); >-- >1.7.10.4
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 14751
:
42061
|
46181
|
47679
| 47680