Lines 17-30
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 3; |
20 |
use Test::More tests => 7; |
21 |
|
21 |
|
22 |
use_ok('Koha::BiblioUtils'); |
22 |
use_ok('Koha::BiblioUtils'); |
23 |
use_ok('Koha::BiblioUtils::Iterator'); |
23 |
use_ok('Koha::BiblioUtils::Iterator'); |
24 |
|
24 |
|
25 |
use C4::Items; |
25 |
use Koha::Database; |
26 |
use C4::Biblio; |
|
|
27 |
use DBI; |
28 |
use t::lib::TestBuilder; |
26 |
use t::lib::TestBuilder; |
29 |
use t::lib::Mocks; |
27 |
use t::lib::Mocks; |
30 |
|
28 |
|
Lines 60-63
my @result_tags = map { $_->tag() } $record->field('...');
Link Here
|
60 |
my @sorted_tags = sort @result_tags; |
58 |
my @sorted_tags = sort @result_tags; |
61 |
is_deeply(\@sorted_tags,$expected_tags, "Got the same tags as expected"); |
59 |
is_deeply(\@sorted_tags,$expected_tags, "Got the same tags as expected"); |
62 |
|
60 |
|
|
|
61 |
|
62 |
my $biblio_2 = $builder->build_sample_biblio(); |
63 |
my $biblio_3 = $builder->build_sample_biblio(); |
64 |
my $records = Koha::BiblioUtils->get_all_biblios_iterator(); |
65 |
is( $records->next->id, $biblio->biblionumber ); |
66 |
is( $records->next->id, $biblio_2->biblionumber ); |
67 |
is( $records->next->id, $biblio_3->biblionumber ); |
68 |
is( $records->next, undef, 'no more record' ); |
69 |
|
63 |
$schema->storage->txn_rollback(); |
70 |
$schema->storage->txn_rollback(); |
64 |
- |
|
|