Bugzilla – Attachment 7206 Details for
Bug 5327
Omnibus for unit tests required for all C4 modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Added unit tests for C4/Koha.pm
0001-t-Koha.t.patch (text/plain), 2.65 KB, created by
Sam Sanders
on 2012-01-17 22:52:19 UTC
(
hide
)
Description:
Added unit tests for C4/Koha.pm
Filename:
MIME Type:
Creator:
Sam Sanders
Created:
2012-01-17 22:52:19 UTC
Size:
2.65 KB
patch
obsolete
>From 90be214ded1036f0bc64959aa6f4dd4ae288ad18 Mon Sep 17 00:00:00 2001 >From: Sam Sanders <sam-sanders@live.com> >Date: Wed, 18 Jan 2012 11:38:20 +1300 >Subject: [PATCH] t/Koha.t > >--- > t/Koha.t | 45 ++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 44 insertions(+), 1 deletions(-) > >diff --git a/t/Koha.t b/t/Koha.t >index 025ab98..b3e6f32 100755 >--- a/t/Koha.t >+++ b/t/Koha.t >@@ -2,7 +2,7 @@ > use strict; > use warnings; > >-use Test::More tests => 8; >+use Test::More tests => 31; > > use_ok('C4::Koha'); > >@@ -28,4 +28,47 @@ is(C4::Koha::_isbn_cleanup('0-590-35340-3'), '0590353403', '_isbn_cleanup remove > is(C4::Koha::_isbn_cleanup('0590353403 (pbk.)'), '0590353403', '_isbn_cleanup removes parenthetical'); > is(C4::Koha::_isbn_cleanup('978-0-321-49694-2'), '0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10'); > >+is(C4::Koha::GetSupportName('BK'),"Books", 'testing support name'); >+is(C4::Koha::GetSupportName(''),undef, 'testing support name'); > >+ok(C4::Koha::GetSupportList(), 'testing support list'); >+ok(C4::Koha::GetItemTypes(), 'testing get items'); >+ >+ok(C4::Koha::GetCcodes(), 'testing get codes'); >+ >+ok(C4::Koha::getframeworks(), 'test getting frameworks'); >+ >+ok(C4::Koha::getframeworkinfo('fa') , 'test getting framework info'); >+ >+my $typeinfo=C4::Koha::getitemtypeinfo('BK'); >+is ($typeinfo->{description},"Books", 'test getting item type'); >+ >+ok(C4::Koha::getitemtypeimagedir() , 'test getting image type'); >+ >+ok(C4::Koha::getitemtypeimagesrc() , 'test image source'); >+ >+ok(C4::Koha::GetPrinters() , 'test getting printers'); >+ >+is(C4::Koha::getnbpages('100','50'),"2", 'test if it returns the number of pages, given the number of items and the number of items per page.'); >+ >+ok(C4::Koha::getallthemes() , 'test getting array of themes'); >+ >+ok(C4::Koha::getFacets() , 'test getting facts'); >+ >+ok(C4::Koha::get_notforloan_label_of(), 'test getting get not for label of'); >+ >+ok(C4::Koha::displayServers(), 'test displaying Servers'); >+ >+is(C4::Koha::GetAuthValCode(''),"",'test getting auth value codes'); >+ >+ok(C4::Koha::GetAuthorisedValueCategories(), 'test getting an arrayref of all of the available authorised value categories.'); >+ >+is(C4::Koha::GetAuthorisedValueByCode(), undef, 'Testing GetAuthorisedValyeByCode returns undef when supplied no code'); >+ >+is(C4::Koha::GetKohaAuthorisedValues(), undef, 'test getting authorised values'); >+ >+is(C4::Koha::GetKohaAuthorisedValuesFromField(), undef, 'test getting authorised values from a field'); >+ >+is(C4::Koha::GetKohaAuthorisedValueLib(), undef, 'test getting authorised values'); >+ >+is(C4::Koha::GetNormalizedISBN(), undef, 'test if GetNormalizedISBN is null returns undef with no arguments'); >-- >1.7.4.1 >
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 5327
:
2716
|
2726
|
5485
|
6236
|
6237
|
6373
|
6560
|
6561
|
6562
|
6563
|
6613
|
6614
|
6616
|
6620
|
6621
|
6622
|
6643
|
6650
|
6655
|
6679
|
6681
|
6682
|
6683
|
6726
|
6727
|
6728
|
6729
|
6730
|
6731
|
6732
|
6795
|
6799
|
6805
|
6819
|
6826
|
6827
|
6828
|
6834
|
7179
|
7180
|
7181
|
7182
|
7183
|
7184
|
7185
|
7186
|
7187
|
7188
|
7189
|
7190
|
7191
|
7192
|
7194
|
7195
|
7203
|
7206
|
7208
|
7209
|
7220
|
7221
|
7222
|
7223
|
7224
|
7225
|
7226
|
7227
|
7228
|
7229
|
7230
|
7231
|
7232
|
7233
|
7234
|
7235
|
7236
|
7237
|
7238
|
7239
|
7240
|
7241
|
7242
|
7400
|
7402
|
7403
|
7405
|
7573
|
7592
|
7593
|
7594
|
9897
|
10234
|
10616
|
10656
|
10659
|
10660
|
10661
|
10680
|
11141
|
11186
|
11212
|
11213
|
11278
|
11279
|
11280
|
11281
|
11339
|
11340
|
11341
|
11440
|
11467
|
11469
|
11470
|
11471
|
11472
|
11473
|
11500
|
11503
|
11505
|
11506
|
11633
|
11762
|
11763
|
11764
|
11765
|
11846
|
11985
|
11993
|
12002
|
12003