Bugzilla – Attachment 33646 Details for
Bug 13276
t/XSLT.t shouldn't depend on the DB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13276: use t::lib::Mocks::mock_dbh
Bug-13276-use-tlibMocksmockdbh.patch (text/plain), 1.07 KB, created by
Jonathan Druart
on 2014-11-18 09:58:21 UTC
(
hide
)
Description:
Bug 13276: use t::lib::Mocks::mock_dbh
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-11-18 09:58:21 UTC
Size:
1.07 KB
patch
obsolete
>From fa3018b619a4cbe20857a66da3a6655c5b1b25bd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 18 Nov 2014 10:56:52 +0100 >Subject: [PATCH] Bug 13276: use t::lib::Mocks::mock_dbh > >To use this patch, patch from bug 13274 should be applied too. >--- > t/XSLT.t | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > >diff --git a/t/XSLT.t b/t/XSLT.t >index 347d372..21c2e93 100755 >--- a/t/XSLT.t >+++ b/t/XSLT.t >@@ -20,18 +20,13 @@ use Modern::Perl; > use Test::More tests => 8; > use File::Temp; > use File::Path qw/make_path/; >-use Test::MockModule; >-use DBD::Mock; > >-# Mock the DB connexion and C4::Context >-my $context = new Test::MockModule('C4::Context'); >-$context->mock( '_new_dbh', sub { >- my $dbh = DBI->connect( 'DBI:Mock:', '', '' ) >- || die "Cannot create handle: $DBI::errstr\n"; >- return $dbh; >-}); >+use t::lib::Mocks; > >-use_ok('C4::XSLT'); >+BEGIN { >+ my $context_module = t::lib::Mocks::mock_dbh; >+ use_ok('C4::XSLT'); >+}; > > my $dir = File::Temp->newdir(); > my @themes = ('prog', 'test'); >-- >2.1.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 13276
:
33633
|
33639
|
33640
| 33646