|
Lines 2-8
Link Here
|
| 2 |
use strict; |
2 |
use strict; |
| 3 |
use warnings; |
3 |
use warnings; |
| 4 |
|
4 |
|
| 5 |
use Test::More tests => 8; |
5 |
use Test::More tests => 31; |
| 6 |
|
6 |
|
| 7 |
use_ok('C4::Koha'); |
7 |
use_ok('C4::Koha'); |
| 8 |
|
8 |
|
|
Lines 28-31
is(C4::Koha::_isbn_cleanup('0-590-35340-3'), '0590353403', '_isbn_cleanup remove
Link Here
|
| 28 |
is(C4::Koha::_isbn_cleanup('0590353403 (pbk.)'), '0590353403', '_isbn_cleanup removes parenthetical'); |
28 |
is(C4::Koha::_isbn_cleanup('0590353403 (pbk.)'), '0590353403', '_isbn_cleanup removes parenthetical'); |
| 29 |
is(C4::Koha::_isbn_cleanup('978-0-321-49694-2'), '0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10'); |
29 |
is(C4::Koha::_isbn_cleanup('978-0-321-49694-2'), '0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10'); |
| 30 |
|
30 |
|
|
|
31 |
is(C4::Koha::GetSupportName('BK'),"Books", 'testing support name'); |
| 32 |
is(C4::Koha::GetSupportName(''),undef, 'testing support name'); |
| 31 |
|
33 |
|
| 32 |
- |
34 |
ok(C4::Koha::GetSupportList(), 'testing support list'); |
|
|
35 |
ok(C4::Koha::GetItemTypes(), 'testing get items'); |
| 36 |
|
| 37 |
ok(C4::Koha::GetCcodes(), 'testing get codes'); |
| 38 |
|
| 39 |
ok(C4::Koha::getframeworks(), 'test getting frameworks'); |
| 40 |
|
| 41 |
ok(C4::Koha::getframeworkinfo('fa') , 'test getting framework info'); |
| 42 |
|
| 43 |
my $typeinfo=C4::Koha::getitemtypeinfo('BK'); |
| 44 |
is ($typeinfo->{description},"Books", 'test getting item type'); |
| 45 |
|
| 46 |
ok(C4::Koha::getitemtypeimagedir() , 'test getting image type'); |
| 47 |
|
| 48 |
ok(C4::Koha::getitemtypeimagesrc() , 'test image source'); |
| 49 |
|
| 50 |
ok(C4::Koha::GetPrinters() , 'test getting printers'); |
| 51 |
|
| 52 |
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.'); |
| 53 |
|
| 54 |
ok(C4::Koha::getallthemes() , 'test getting array of themes'); |
| 55 |
|
| 56 |
ok(C4::Koha::getFacets() , 'test getting facts'); |
| 57 |
|
| 58 |
ok(C4::Koha::get_notforloan_label_of(), 'test getting get not for label of'); |
| 59 |
|
| 60 |
ok(C4::Koha::displayServers(), 'test displaying Servers'); |
| 61 |
|
| 62 |
is(C4::Koha::GetAuthValCode(''),"",'test getting auth value codes'); |
| 63 |
|
| 64 |
ok(C4::Koha::GetAuthorisedValueCategories(), 'test getting an arrayref of all of the available authorised value categories.'); |
| 65 |
|
| 66 |
is(C4::Koha::GetAuthorisedValueByCode(), undef, 'Testing GetAuthorisedValyeByCode returns undef when supplied no code'); |
| 67 |
|
| 68 |
is(C4::Koha::GetKohaAuthorisedValues(), undef, 'test getting authorised values'); |
| 69 |
|
| 70 |
is(C4::Koha::GetKohaAuthorisedValuesFromField(), undef, 'test getting authorised values from a field'); |
| 71 |
|
| 72 |
is(C4::Koha::GetKohaAuthorisedValueLib(), undef, 'test getting authorised values'); |
| 73 |
|
| 74 |
is(C4::Koha::GetNormalizedISBN(), undef, 'test if GetNormalizedISBN is null returns undef with no arguments'); |