[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/t Shelf.t [rel_3_0]
From: |
Antoine Farnault |
Subject: |
[Koha-cvs] koha/t Shelf.t [rel_3_0] |
Date: |
Thu, 31 Aug 2006 09:27:11 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Antoine Farnault <toins> 06/08/31 09:27:11
Removed files:
t : Shelf.t
Log message:
this test file test Shelf.pm which is unused...
A new test file for BookShelves.pm coming soon.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/t/Shelf.t?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2&r2=0
Patches:
Index: Shelf.t
===================================================================
RCS file: Shelf.t
diff -N Shelf.t
--- Shelf.t 24 Oct 2002 04:12:10 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,66 +0,0 @@
-BEGIN { $| = 1; print "1..25\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use C4::Shelf;
-use C4::Context;
-$loaded = 1;
-print "ok 1\n";
-
-
-
-# Load some sample data from the items table
-my $itemdata;
-my $dbh=C4::Context->dbh();
-my $sth=$dbh->prepare("select biblionumber,biblioitemnumber,itemnumber from
items limit 30");
-$sth->execute;
-while (my ($biblionumber, $biblioitemnumber, $itemnumber) = $sth->fetchrow) {
- push @$itemdata, { biblionumber=>$biblionumber,
biblioitemnumber=>$biblioitemnumber, itemnumber=>$itemnumber };
-}
-
-if ($itemdata=~/^ARRAY/) {
- print "ok 2\n";
-} else {
- print "not ok 2\n";
-}
-
-
-
-# Create a couple of new shelves
-
-my $shelf=Shelf->new('Shelf1', -1);
-my $shelf2=Shelf->new('Shelf2', -1);
-
-if (defined $shelf) {
- print "ok 3\n";
-} else {
- print "not ok 3\n";
-}
-
-
-# Add some items to the shelves
-
-
-for ($i=0; $i<20; $i++) {
- $shelf->addtoshelf( -add => [[ $$itemdata[$i]->{biblionumber},
- $$itemdata[$i]->{biblioitemnumber},
- $$itemdata[$i]->{itemnumber} ]]);
-}
-for ($i=20; $i<30; $i++) {
- $shelf2->addtoshelf( -add => [[ $$itemdata[$i]->{biblionumber},
- $$itemdata[$i]->{biblioitemnumber},
- $$itemdata[$i]->{itemnumber} ]]);
-}
-
-if ($shelf->itemcounter() == 20 && $shelf2->itemcounter() == 10 ) {
- print "ok 4\n";
-} else {
- print "not ok 4\n";
-}
-
-$shelf->attribute('testattribute1', 'testvalue1');
-$shelf->attribute('testattribute2', 'testvalue2');
-
-if ($shelf->attribute('testattribute1') eq 'testvalue1' &&
$shelf->attribute('testattribute2') eq 'testvalue2') {
- print "ok 5\n";
-} else {
- print "not ok 5\n";
-}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/t Shelf.t [rel_3_0],
Antoine Farnault <=