Lines 36-337
$object2->surname('Test Borrower Surname 2');
Link Here
|
36 |
is( $object2->surname(), 'Test Borrower Surname 2', "Accessor returns correct value after set" ); |
36 |
is( $object2->surname(), 'Test Borrower Surname 2', "Accessor returns correct value after set" ); |
37 |
|
37 |
|
38 |
my $ret; |
38 |
my $ret; |
39 |
$ret = $object2->set({ surname => "Test Borrower Surname 3", firstname => "Test Firstname" }); |
39 |
$ret = $object2->set( { surname => "Test Borrower Surname 3", firstname => "Test Firstname" } ); |
40 |
ok( ref($ret) eq 'Koha::Borrower', "Set returns object on success" ); |
40 |
ok( ref($ret) eq 'Koha::Borrower', "Set returns object on success" ); |
41 |
is( $object2->surname(), "Test Borrower Surname 3", "Set sets first field correctly" ); |
41 |
is( $object2->surname(), "Test Borrower Surname 3", "Set sets first field correctly" ); |
42 |
is( $object2->firstname(), "Test Firstname", "Set sets second field correctly" ); |
42 |
is( $object2->firstname(), "Test Firstname", "Set sets second field correctly" ); |
43 |
|
43 |
|
44 |
$ret = $object->set({ surname => "Test Borrower Surname 4", bork => "bork" }); |
44 |
$ret = $object->set( { surname => "Test Borrower Surname 4", bork => "bork" } ); |
45 |
is( $object2->surname(), "Test Borrower Surname 3", "Bad Set does not set field" ); |
45 |
is( $object2->surname(), "Test Borrower Surname 3", "Bad Set does not set field" ); |
46 |
is( $ret, 0, "Set returns 0 when passed a bad property" ); |
46 |
is( $ret, 0, "Set returns 0 when passed a bad property" ); |
47 |
|
47 |
|
48 |
ok( ! defined $object->bork(), 'Bad getter returns undef' ); |
48 |
ok( !defined $object->bork(), 'Bad getter returns undef' ); |
49 |
ok( ! defined $object->bork('bork'), 'Bad setter returns undef' ); |
49 |
ok( !defined $object->bork('bork'), 'Bad setter returns undef' ); |
50 |
|
50 |
|
51 |
my $borrower = Koha::Borrower->new({ |
51 |
my $borrower = Koha::Borrower->new( |
52 |
borrowernumber => '12345', |
52 |
{ |
53 |
cardnumber => '1234567890', |
53 |
borrowernumber => '12345', |
54 |
surname => 'mySurname', |
54 |
cardnumber => '1234567890', |
55 |
firstname => 'myFirstname', |
55 |
surname => 'mySurname', |
56 |
title => 'Mr.', |
56 |
firstname => 'myFirstname', |
57 |
othernames => 'myOthernames', |
57 |
title => 'Mr.', |
58 |
initials => 'MM', |
58 |
othernames => 'myOthernames', |
59 |
streetnumber => '100', |
59 |
initials => 'MM', |
60 |
streettype => 'Blvd', |
60 |
streetnumber => '100', |
61 |
address => 'my personnal address', |
61 |
streettype => 'Blvd', |
62 |
address2 => 'my adress2', |
62 |
address => 'my personnal address', |
63 |
city => 'Marseille', |
63 |
address2 => 'my adress2', |
64 |
state => 'mystate', |
64 |
city => 'Marseille', |
65 |
zipcode => '13006', |
65 |
state => 'mystate', |
66 |
country => 'France', |
66 |
zipcode => '13006', |
67 |
email => 'mySurname.myFirstname@email.com', |
67 |
country => 'France', |
68 |
phone => '0402872934', |
68 |
email => 'mySurname.myFirstname@email.com', |
69 |
mobile => '0627884632', |
69 |
phone => '0402872934', |
70 |
fax => '0402872935', |
70 |
mobile => '0627884632', |
71 |
emailpro => 'myEmailPro@email.com', |
71 |
fax => '0402872935', |
72 |
phonepro => '0402873334', |
72 |
emailpro => 'myEmailPro@email.com', |
73 |
B_streetnumber => '101', |
73 |
phonepro => '0402873334', |
74 |
B_streettype => 'myB_streettype', |
74 |
B_streetnumber => '101', |
75 |
B_address => 'myB_address', |
75 |
B_streettype => 'myB_streettype', |
76 |
B_address2 => 'myB_address2', |
76 |
B_address => 'myB_address', |
77 |
B_city => 'myB_city', |
77 |
B_address2 => 'myB_address2', |
78 |
B_state => 'myB_state', |
78 |
B_city => 'myB_city', |
79 |
B_zipcode => '23456', |
79 |
B_state => 'myB_state', |
80 |
B_country => 'myB_country', |
80 |
B_zipcode => '23456', |
81 |
B_email => 'myB_email', |
81 |
B_country => 'myB_country', |
82 |
B_phone => '0678353935', |
82 |
B_email => 'myB_email', |
83 |
dateofbirth => '1990-07-16', |
83 |
B_phone => '0678353935', |
84 |
branchcode => 'myBranCode', |
84 |
dateofbirth => '1990-07-16', |
85 |
categorycode => 'myCatCode', |
85 |
branchcode => 'myBranCode', |
86 |
dateenrolled => '2015-03-19', |
86 |
categorycode => 'myCatCode', |
87 |
dateexpiry => '2016-03-19', |
87 |
dateenrolled => '2015-03-19', |
88 |
gonenoaddress => '0', |
88 |
dateexpiry => '2016-03-19', |
89 |
lost => '0', |
89 |
gonenoaddress => '0', |
90 |
debarred => '2015-04-19', |
90 |
lost => '0', |
91 |
debarredcomment => 'You are debarred', |
91 |
debarred => '2015-04-19', |
92 |
contactname => 'myContactname', |
92 |
debarredcomment => 'You are debarred', |
93 |
contactfirstname => 'myContactfirstname', |
93 |
contactname => 'myContactname', |
94 |
contacttitle => 'myContacttitle', |
94 |
contactfirstname => 'myContactfirstname', |
95 |
guarantorid => '123454321', |
95 |
contacttitle => 'myContacttitle', |
96 |
borrowernotes => 'borrowernotes', |
96 |
guarantorid => '123454321', |
97 |
relationship => 'myRelationship', |
97 |
borrowernotes => 'borrowernotes', |
98 |
ethnicity => undef, |
98 |
relationship => 'myRelationship', |
99 |
ethnotes => undef, |
99 |
ethnicity => undef, |
100 |
sex => 'M', |
100 |
ethnotes => undef, |
101 |
password => 'hfkurhfe976634èj!', |
101 |
sex => 'M', |
102 |
flags => '55555', |
102 |
password => 'hfkurhfe976634èj!', |
103 |
userid => '87987', |
103 |
flags => '55555', |
104 |
opacnote => 'myOpacnote', |
104 |
userid => '87987', |
105 |
contactnote => 'myContactnote', |
105 |
opacnote => 'myOpacnote', |
106 |
sort1 => 'mySort1', |
106 |
contactnote => 'myContactnote', |
107 |
sort2 => 'mySort2', |
107 |
sort1 => 'mySort1', |
108 |
altcontactfirstname => 'myAltcontactfirstname', |
108 |
sort2 => 'mySort2', |
109 |
altcontactsurname => 'myAltcontactsurname', |
109 |
altcontactfirstname => 'myAltcontactfirstname', |
110 |
altcontactaddress1 => 'myAltcontactaddress1', |
110 |
altcontactsurname => 'myAltcontactsurname', |
111 |
altcontactaddress2 => 'myAltcontactaddress2', |
111 |
altcontactaddress1 => 'myAltcontactaddress1', |
112 |
altcontactaddress3 => 'myAltcontactaddress3', |
112 |
altcontactaddress2 => 'myAltcontactaddress2', |
113 |
altcontactstate => 'myAltcontactstate', |
113 |
altcontactaddress3 => 'myAltcontactaddress3', |
114 |
altcontactzipcode => '465843', |
114 |
altcontactstate => 'myAltcontactstate', |
115 |
altcontactcountry => 'myOtherCountry', |
115 |
altcontactzipcode => '465843', |
116 |
altcontactphone => 'myOtherphone', |
116 |
altcontactcountry => 'myOtherCountry', |
117 |
smsalertnumber => '0683027346', |
117 |
altcontactphone => 'myOtherphone', |
118 |
privacy => '667788', |
118 |
smsalertnumber => '0683027346', |
119 |
}); |
119 |
privacy => '667788', |
|
|
120 |
} |
121 |
); |
120 |
|
122 |
|
121 |
#borrower Accessor tests |
123 |
#borrower Accessor tests |
122 |
subtest 'Accessor tests' => sub{ |
124 |
subtest 'Accessor tests' => sub { |
123 |
plan tests => 67; |
125 |
plan tests => 67; |
124 |
is( $borrower->borrowernumber, '12345', 'borrowernumber accessor returns correct value' ); |
126 |
is( $borrower->borrowernumber, '12345', 'borrowernumber accessor returns correct value' ); |
125 |
is( $borrower->cardnumber, '1234567890', 'cardnumber accessor returns correct value'); |
127 |
is( $borrower->cardnumber, '1234567890', 'cardnumber accessor returns correct value' ); |
126 |
is( $borrower->surname, 'mySurname', 'surname accessor returns correct value'); |
128 |
is( $borrower->surname, 'mySurname', 'surname accessor returns correct value' ); |
127 |
is( $borrower->firstname, 'myFirstname', 'firstname accessor returns correct value'); |
129 |
is( $borrower->firstname, 'myFirstname', 'firstname accessor returns correct value' ); |
128 |
is( $borrower->title, 'Mr.', 'title accessor returns correct value'); |
130 |
is( $borrower->title, 'Mr.', 'title accessor returns correct value' ); |
129 |
is( $borrower->othernames, 'myOthernames', 'othernames accessor returns correct value'); |
131 |
is( $borrower->othernames, 'myOthernames', 'othernames accessor returns correct value' ); |
130 |
is( $borrower->initials, 'MM', 'initials accessor returns correct value'); |
132 |
is( $borrower->initials, 'MM', 'initials accessor returns correct value' ); |
131 |
is( $borrower->streetnumber, '100', 'streetnumber accessor returns correct value'); |
133 |
is( $borrower->streetnumber, '100', 'streetnumber accessor returns correct value' ); |
132 |
is( $borrower->streettype, 'Blvd', 'streettype accessor returns correct value'); |
134 |
is( $borrower->streettype, 'Blvd', 'streettype accessor returns correct value' ); |
133 |
is( $borrower->address, 'my personnal address', 'address accessor returns correct value'); |
135 |
is( $borrower->address, 'my personnal address', 'address accessor returns correct value' ); |
134 |
is( $borrower->address2, 'my adress2', 'address2 accessor returns correct value'); |
136 |
is( $borrower->address2, 'my adress2', 'address2 accessor returns correct value' ); |
135 |
is( $borrower->city, 'Marseille', 'city accessor returns correct value'); |
137 |
is( $borrower->city, 'Marseille', 'city accessor returns correct value' ); |
136 |
is( $borrower->state, 'mystate', 'state accessor returns correct value'); |
138 |
is( $borrower->state, 'mystate', 'state accessor returns correct value' ); |
137 |
is( $borrower->zipcode, '13006', 'zipcode accessor returns correct value'); |
139 |
is( $borrower->zipcode, '13006', 'zipcode accessor returns correct value' ); |
138 |
is( $borrower->country, 'France', 'country accessor returns correct value'); |
140 |
is( $borrower->country, 'France', 'country accessor returns correct value' ); |
139 |
is( $borrower->email, 'mySurname.myFirstname@email.com', 'email accessor returns correct value'); |
141 |
is( $borrower->email, 'mySurname.myFirstname@email.com', 'email accessor returns correct value' ); |
140 |
is( $borrower->phone, '0402872934', 'phone accessor returns correct value'); |
142 |
is( $borrower->phone, '0402872934', 'phone accessor returns correct value' ); |
141 |
is( $borrower->mobile, '0627884632', 'mobile accessor returns correct value'); |
143 |
is( $borrower->mobile, '0627884632', 'mobile accessor returns correct value' ); |
142 |
is( $borrower->fax, '0402872935', 'fax accessor returns correct value'); |
144 |
is( $borrower->fax, '0402872935', 'fax accessor returns correct value' ); |
143 |
is( $borrower->emailpro, 'myEmailPro@email.com', 'emailpro accessor returns correct value'); |
145 |
is( $borrower->emailpro, 'myEmailPro@email.com', 'emailpro accessor returns correct value' ); |
144 |
is( $borrower->phonepro, '0402873334', 'phonepro accessor returns correct value'); |
146 |
is( $borrower->phonepro, '0402873334', 'phonepro accessor returns correct value' ); |
145 |
is( $borrower->B_streetnumber, '101', 'B_streetnumber accessor returns correct value'); |
147 |
is( $borrower->B_streetnumber, '101', 'B_streetnumber accessor returns correct value' ); |
146 |
is( $borrower->B_streettype, 'myB_streettype', 'B_streettype accessor returns correct value'); |
148 |
is( $borrower->B_streettype, 'myB_streettype', 'B_streettype accessor returns correct value' ); |
147 |
is( $borrower->B_address, 'myB_address', 'B_address accessor returns correct value'); |
149 |
is( $borrower->B_address, 'myB_address', 'B_address accessor returns correct value' ); |
148 |
is( $borrower->B_address2, 'myB_address2', 'B_address2 accessor returns correct value'); |
150 |
is( $borrower->B_address2, 'myB_address2', 'B_address2 accessor returns correct value' ); |
149 |
is( $borrower->B_city, 'myB_city', 'B_city accessor returns correct value'); |
151 |
is( $borrower->B_city, 'myB_city', 'B_city accessor returns correct value' ); |
150 |
is( $borrower->B_state, 'myB_state', 'B_state accessor returns correct value'); |
152 |
is( $borrower->B_state, 'myB_state', 'B_state accessor returns correct value' ); |
151 |
is( $borrower->B_zipcode, '23456', 'B_zipcode accessor returns correct value'); |
153 |
is( $borrower->B_zipcode, '23456', 'B_zipcode accessor returns correct value' ); |
152 |
is( $borrower->B_country, 'myB_country', 'B_country accessor returns correct value'); |
154 |
is( $borrower->B_country, 'myB_country', 'B_country accessor returns correct value' ); |
153 |
is( $borrower->B_email, 'myB_email', 'B_email accessor returns correct value'); |
155 |
is( $borrower->B_email, 'myB_email', 'B_email accessor returns correct value' ); |
154 |
is( $borrower->B_phone, '0678353935', 'B_phone accessor returns correct value'); |
156 |
is( $borrower->B_phone, '0678353935', 'B_phone accessor returns correct value' ); |
155 |
is( $borrower->dateofbirth, '1990-07-16', 'dateofbirth accessor returns correct value'); |
157 |
is( $borrower->dateofbirth, '1990-07-16', 'dateofbirth accessor returns correct value' ); |
156 |
is( $borrower->branchcode, 'myBranCode', 'branchcode accessor returns correct value'); |
158 |
is( $borrower->branchcode, 'myBranCode', 'branchcode accessor returns correct value' ); |
157 |
is( $borrower->categorycode, 'myCatCode', 'categorycode accessor returns correct value'); |
159 |
is( $borrower->categorycode, 'myCatCode', 'categorycode accessor returns correct value' ); |
158 |
is( $borrower->dateenrolled, '2015-03-19', 'dateenrolled accessor returns correct value'); |
160 |
is( $borrower->dateenrolled, '2015-03-19', 'dateenrolled accessor returns correct value' ); |
159 |
is( $borrower->dateexpiry, '2016-03-19', 'dateexpiry accessor returns correct value'); |
161 |
is( $borrower->dateexpiry, '2016-03-19', 'dateexpiry accessor returns correct value' ); |
160 |
is( $borrower->gonenoaddress, '0', 'gonenoaddress accessor returns correct value'); |
162 |
is( $borrower->gonenoaddress, '0', 'gonenoaddress accessor returns correct value' ); |
161 |
is( $borrower->lost, '0', 'lost accessor returns correct value'); |
163 |
is( $borrower->lost, '0', 'lost accessor returns correct value' ); |
162 |
is( $borrower->debarred, '2015-04-19', 'debarred accessor returns correct value'); |
164 |
is( $borrower->debarred, '2015-04-19', 'debarred accessor returns correct value' ); |
163 |
is( $borrower->debarredcomment, 'You are debarred', 'debarredcomment accessor returns correct value'); |
165 |
is( $borrower->debarredcomment, 'You are debarred', 'debarredcomment accessor returns correct value' ); |
164 |
is( $borrower->contactname, 'myContactname', 'contactname accessor returns correct value'); |
166 |
is( $borrower->contactname, 'myContactname', 'contactname accessor returns correct value' ); |
165 |
is( $borrower->contactfirstname, 'myContactfirstname', 'contactfirstname accessor returns correct value'); |
167 |
is( $borrower->contactfirstname, 'myContactfirstname', 'contactfirstname accessor returns correct value' ); |
166 |
is( $borrower->contacttitle, 'myContacttitle', 'contacttitle accessor returns correct value'); |
168 |
is( $borrower->contacttitle, 'myContacttitle', 'contacttitle accessor returns correct value' ); |
167 |
is( $borrower->guarantorid, '123454321', 'guarantorid accessor returns correct value'); |
169 |
is( $borrower->guarantorid, '123454321', 'guarantorid accessor returns correct value' ); |
168 |
is( $borrower->borrowernotes, 'borrowernotes', 'borrowernotes accessor returns correct value'); |
170 |
is( $borrower->borrowernotes, 'borrowernotes', 'borrowernotes accessor returns correct value' ); |
169 |
is( $borrower->relationship, 'myRelationship', 'relationship accessor returns correct value'); |
171 |
is( $borrower->relationship, 'myRelationship', 'relationship accessor returns correct value' ); |
170 |
is( $borrower->ethnicity, undef, 'ethnicity accessor returns correct value'); |
172 |
is( $borrower->ethnicity, undef, 'ethnicity accessor returns correct value' ); |
171 |
is( $borrower->ethnotes, undef, 'ethnotes accessor returns correct value'); |
173 |
is( $borrower->ethnotes, undef, 'ethnotes accessor returns correct value' ); |
172 |
is( $borrower->sex, 'M', 'sex accessor returns correct value'); |
174 |
is( $borrower->sex, 'M', 'sex accessor returns correct value' ); |
173 |
is( $borrower->password, 'hfkurhfe976634èj!', 'password accessor returns correct value'); |
175 |
is( $borrower->password, 'hfkurhfe976634èj!', 'password accessor returns correct value' ); |
174 |
is( $borrower->flags, '55555', 'flags accessor returns correct value'); |
176 |
is( $borrower->flags, '55555', 'flags accessor returns correct value' ); |
175 |
is( $borrower->userid, '87987', 'userid accessor returns correct value'); |
177 |
is( $borrower->userid, '87987', 'userid accessor returns correct value' ); |
176 |
is( $borrower->opacnote, 'myOpacnote', 'opacnote accessor returns correct value'); |
178 |
is( $borrower->opacnote, 'myOpacnote', 'opacnote accessor returns correct value' ); |
177 |
is( $borrower->contactnote, 'myContactnote', 'contactnote accessor returns correct value'); |
179 |
is( $borrower->contactnote, 'myContactnote', 'contactnote accessor returns correct value' ); |
178 |
is( $borrower->sort1, 'mySort1', 'sort1 accessor returns correct value'); |
180 |
is( $borrower->sort1, 'mySort1', 'sort1 accessor returns correct value' ); |
179 |
is( $borrower->sort2, 'mySort2', 'sort2 accessor returns correct value'); |
181 |
is( $borrower->sort2, 'mySort2', 'sort2 accessor returns correct value' ); |
180 |
is( $borrower->altcontactfirstname, 'myAltcontactfirstname', 'altcontactfirstname accessor returns correct value'); |
182 |
is( $borrower->altcontactfirstname, 'myAltcontactfirstname', 'altcontactfirstname accessor returns correct value' ); |
181 |
is( $borrower->altcontactsurname, 'myAltcontactsurname', 'altcontactsurname accessor returns correct value'); |
183 |
is( $borrower->altcontactsurname, 'myAltcontactsurname', 'altcontactsurname accessor returns correct value' ); |
182 |
is( $borrower->altcontactaddress1, 'myAltcontactaddress1', 'altcontactaddress1 accessor returns correct value'); |
184 |
is( $borrower->altcontactaddress1, 'myAltcontactaddress1', 'altcontactaddress1 accessor returns correct value' ); |
183 |
is( $borrower->altcontactaddress2, 'myAltcontactaddress2', 'altcontactaddress2 accessor returns correct value'); |
185 |
is( $borrower->altcontactaddress2, 'myAltcontactaddress2', 'altcontactaddress2 accessor returns correct value' ); |
184 |
is( $borrower->altcontactaddress3, 'myAltcontactaddress3', 'altcontactaddress3 accessor returns correct value'); |
186 |
is( $borrower->altcontactaddress3, 'myAltcontactaddress3', 'altcontactaddress3 accessor returns correct value' ); |
185 |
is( $borrower->altcontactstate, 'myAltcontactstate', 'altcontactstate accessor returns correct value'); |
187 |
is( $borrower->altcontactstate, 'myAltcontactstate', 'altcontactstate accessor returns correct value' ); |
186 |
is( $borrower->altcontactzipcode, '465843', 'altcontactzipcode accessor returns correct value'); |
188 |
is( $borrower->altcontactzipcode, '465843', 'altcontactzipcode accessor returns correct value' ); |
187 |
is( $borrower->altcontactcountry, 'myOtherCountry', 'altcontactcountry accessor returns correct value'); |
189 |
is( $borrower->altcontactcountry, 'myOtherCountry', 'altcontactcountry accessor returns correct value' ); |
188 |
is( $borrower->altcontactphone, 'myOtherphone', 'altcontactphone accessor returns correct value'); |
190 |
is( $borrower->altcontactphone, 'myOtherphone', 'altcontactphone accessor returns correct value' ); |
189 |
is( $borrower->smsalertnumber, '0683027346', 'smsalertnumber accessor returns correct value'); |
191 |
is( $borrower->smsalertnumber, '0683027346', 'smsalertnumber accessor returns correct value' ); |
190 |
is( $borrower->privacy, '667788', 'privacy accessor returns correct value'); |
192 |
is( $borrower->privacy, '667788', 'privacy accessor returns correct value' ); |
191 |
}; |
193 |
}; |
192 |
|
194 |
|
193 |
|
|
|
194 |
#borrower Set tests |
195 |
#borrower Set tests |
195 |
subtest 'Set tests' => sub{ |
196 |
subtest 'Set tests' => sub { |
196 |
plan tests => 67; |
197 |
plan tests => 67; |
197 |
|
198 |
|
198 |
$borrower->set({ |
199 |
$borrower->set( |
199 |
borrowernumber => '12346', |
200 |
{ |
200 |
cardnumber => '1234567891', |
201 |
borrowernumber => '12346', |
201 |
surname => 'SmySurname', |
202 |
cardnumber => '1234567891', |
202 |
firstname => 'SmyFirstname', |
203 |
surname => 'SmySurname', |
203 |
title => 'Mme.', |
204 |
firstname => 'SmyFirstname', |
204 |
othernames => 'SmyOthernames', |
205 |
title => 'Mme.', |
205 |
initials => 'SS', |
206 |
othernames => 'SmyOthernames', |
206 |
streetnumber => '200', |
207 |
initials => 'SS', |
207 |
streettype => 'Rue', |
208 |
streetnumber => '200', |
208 |
address => 'Smy personnal address', |
209 |
streettype => 'Rue', |
209 |
address2 => 'Smy adress2', |
210 |
address => 'Smy personnal address', |
210 |
city => 'Lyon', |
211 |
address2 => 'Smy adress2', |
211 |
state => 'Smystate', |
212 |
city => 'Lyon', |
212 |
zipcode => '69000', |
213 |
state => 'Smystate', |
213 |
country => 'France', |
214 |
zipcode => '69000', |
214 |
email => 'SmySurname.myFirstname@email.com', |
215 |
country => 'France', |
215 |
phone => '0402872935', |
216 |
email => 'SmySurname.myFirstname@email.com', |
216 |
mobile => '0627884633', |
217 |
phone => '0402872935', |
217 |
fax => '0402872936', |
218 |
mobile => '0627884633', |
218 |
emailpro => 'SmyEmailPro@email.com', |
219 |
fax => '0402872936', |
219 |
phonepro => '0402873335', |
220 |
emailpro => 'SmyEmailPro@email.com', |
220 |
B_streetnumber => '102', |
221 |
phonepro => '0402873335', |
221 |
B_streettype => 'SmyB_streettype', |
222 |
B_streetnumber => '102', |
222 |
B_address => 'SmyB_address', |
223 |
B_streettype => 'SmyB_streettype', |
223 |
B_address2 => 'SmyB_address2', |
224 |
B_address => 'SmyB_address', |
224 |
B_city => 'SmyB_city', |
225 |
B_address2 => 'SmyB_address2', |
225 |
B_state => 'SmyB_state', |
226 |
B_city => 'SmyB_city', |
226 |
B_zipcode => '12333', |
227 |
B_state => 'SmyB_state', |
227 |
B_country => 'SmyB_country', |
228 |
B_zipcode => '12333', |
228 |
B_email => 'SmyB_email', |
229 |
B_country => 'SmyB_country', |
229 |
B_phone => '0678353936', |
230 |
B_email => 'SmyB_email', |
230 |
dateofbirth => '1991-07-16', |
231 |
B_phone => '0678353936', |
231 |
branchcode => 'SmyBranCode', |
232 |
dateofbirth => '1991-07-16', |
232 |
categorycode => 'SmyCatCode', |
233 |
branchcode => 'SmyBranCode', |
233 |
dateenrolled => '2014-03-19', |
234 |
categorycode => 'SmyCatCode', |
234 |
dateexpiry => '2017-03-19', |
235 |
dateenrolled => '2014-03-19', |
235 |
gonenoaddress => '1', |
236 |
dateexpiry => '2017-03-19', |
236 |
lost => '1', |
237 |
gonenoaddress => '1', |
237 |
debarred => '2016-04-19', |
238 |
lost => '1', |
238 |
debarredcomment => 'You are still debarred', |
239 |
debarred => '2016-04-19', |
239 |
contactname => 'SmyContactname', |
240 |
debarredcomment => 'You are still debarred', |
240 |
contactfirstname => 'SmyContactfirstname', |
241 |
contactname => 'SmyContactname', |
241 |
contacttitle => 'SmyContacttitle', |
242 |
contactfirstname => 'SmyContactfirstname', |
242 |
guarantorid => '223454321', |
243 |
contacttitle => 'SmyContacttitle', |
243 |
borrowernotes => 'Sborrowernotes', |
244 |
guarantorid => '223454321', |
244 |
relationship => 'SmyRelationship', |
245 |
borrowernotes => 'Sborrowernotes', |
245 |
ethnicity => undef, |
246 |
relationship => 'SmyRelationship', |
246 |
ethnotes => undef, |
247 |
ethnicity => undef, |
247 |
sex => 'F', |
248 |
ethnotes => undef, |
248 |
password => 'zerzerzer#', |
249 |
sex => 'F', |
249 |
flags => '666666', |
250 |
password => 'zerzerzer#', |
250 |
userid => '98233', |
251 |
flags => '666666', |
251 |
opacnote => 'SmyOpacnote', |
252 |
userid => '98233', |
252 |
contactnote => 'SmyContactnote', |
253 |
opacnote => 'SmyOpacnote', |
253 |
sort1 => 'SmySort1', |
254 |
contactnote => 'SmyContactnote', |
254 |
sort2 => 'SmySort2', |
255 |
sort1 => 'SmySort1', |
255 |
altcontactfirstname => 'SmyAltcontactfirstname', |
256 |
sort2 => 'SmySort2', |
256 |
altcontactsurname => 'SmyAltcontactsurname', |
257 |
altcontactfirstname => 'SmyAltcontactfirstname', |
257 |
altcontactaddress1 => 'SmyAltcontactaddress1', |
258 |
altcontactsurname => 'SmyAltcontactsurname', |
258 |
altcontactaddress2 => 'SmyAltcontactaddress2', |
259 |
altcontactaddress1 => 'SmyAltcontactaddress1', |
259 |
altcontactaddress3 => 'SmyAltcontactaddress3', |
260 |
altcontactaddress2 => 'SmyAltcontactaddress2', |
260 |
altcontactstate => 'SmyAltcontactstate', |
261 |
altcontactaddress3 => 'SmyAltcontactaddress3', |
261 |
altcontactzipcode => '565843', |
262 |
altcontactstate => 'SmyAltcontactstate', |
262 |
altcontactcountry => 'SmyOtherCountry', |
263 |
altcontactzipcode => '565843', |
263 |
altcontactphone => 'SmyOtherphone', |
264 |
altcontactcountry => 'SmyOtherCountry', |
264 |
smsalertnumber => '0683027347', |
265 |
altcontactphone => 'SmyOtherphone', |
265 |
privacy => '667789' |
266 |
smsalertnumber => '0683027347', |
266 |
}); |
267 |
privacy => '667789' |
|
|
268 |
} |
269 |
); |
267 |
|
270 |
|
268 |
is( $borrower->borrowernumber, '12346', 'borrowernumber field set ok'); |
271 |
is( $borrower->borrowernumber, '12346', 'borrowernumber field set ok' ); |
269 |
is( $borrower->cardnumber, '1234567891', 'cardnumber field set ok'); |
272 |
is( $borrower->cardnumber, '1234567891', 'cardnumber field set ok' ); |
270 |
is( $borrower->surname, 'SmySurname', 'surname field set ok'); |
273 |
is( $borrower->surname, 'SmySurname', 'surname field set ok' ); |
271 |
is( $borrower->firstname, 'SmyFirstname', 'firstname field set ok'); |
274 |
is( $borrower->firstname, 'SmyFirstname', 'firstname field set ok' ); |
272 |
is( $borrower->title, 'Mme.', 'title field set ok'); |
275 |
is( $borrower->title, 'Mme.', 'title field set ok' ); |
273 |
is( $borrower->othernames, 'SmyOthernames', 'othernames field set ok'); |
276 |
is( $borrower->othernames, 'SmyOthernames', 'othernames field set ok' ); |
274 |
is( $borrower->initials, 'SS', 'initials field set ok'); |
277 |
is( $borrower->initials, 'SS', 'initials field set ok' ); |
275 |
is( $borrower->streetnumber, '200', 'streetnumber field set ok'); |
278 |
is( $borrower->streetnumber, '200', 'streetnumber field set ok' ); |
276 |
is( $borrower->streettype, 'Rue', 'streettype field set ok'); |
279 |
is( $borrower->streettype, 'Rue', 'streettype field set ok' ); |
277 |
is( $borrower->address, 'Smy personnal address', 'address field set ok'); |
280 |
is( $borrower->address, 'Smy personnal address', 'address field set ok' ); |
278 |
is( $borrower->address2, 'Smy adress2', 'address2 field set ok'); |
281 |
is( $borrower->address2, 'Smy adress2', 'address2 field set ok' ); |
279 |
is( $borrower->city, 'Lyon', 'city field set ok'); |
282 |
is( $borrower->city, 'Lyon', 'city field set ok' ); |
280 |
is( $borrower->state, 'Smystate', 'state field set ok'); |
283 |
is( $borrower->state, 'Smystate', 'state field set ok' ); |
281 |
is( $borrower->zipcode, '69000', 'zipcode field set ok'); |
284 |
is( $borrower->zipcode, '69000', 'zipcode field set ok' ); |
282 |
is( $borrower->country, 'France', 'country field set ok'); |
285 |
is( $borrower->country, 'France', 'country field set ok' ); |
283 |
is( $borrower->email, 'SmySurname.myFirstname@email.com', 'email field set ok'); |
286 |
is( $borrower->email, 'SmySurname.myFirstname@email.com', 'email field set ok' ); |
284 |
is( $borrower->phone, '0402872935', 'phone field set ok'); |
287 |
is( $borrower->phone, '0402872935', 'phone field set ok' ); |
285 |
is( $borrower->mobile, '0627884633', 'mobile field set ok'); |
288 |
is( $borrower->mobile, '0627884633', 'mobile field set ok' ); |
286 |
is( $borrower->fax, '0402872936', 'fax field set ok'); |
289 |
is( $borrower->fax, '0402872936', 'fax field set ok' ); |
287 |
is( $borrower->emailpro, 'SmyEmailPro@email.com', 'emailpro field set ok'); |
290 |
is( $borrower->emailpro, 'SmyEmailPro@email.com', 'emailpro field set ok' ); |
288 |
is( $borrower->phonepro, '0402873335', 'phonepro field set ok'); |
291 |
is( $borrower->phonepro, '0402873335', 'phonepro field set ok' ); |
289 |
is( $borrower->B_streetnumber, '102', 'B_streetnumber field set ok'); |
292 |
is( $borrower->B_streetnumber, '102', 'B_streetnumber field set ok' ); |
290 |
is( $borrower->B_streettype, 'SmyB_streettype', 'B_streettype field set ok'); |
293 |
is( $borrower->B_streettype, 'SmyB_streettype', 'B_streettype field set ok' ); |
291 |
is( $borrower->B_address, 'SmyB_address', 'B_address field set ok'); |
294 |
is( $borrower->B_address, 'SmyB_address', 'B_address field set ok' ); |
292 |
is( $borrower->B_address2, 'SmyB_address2', 'B_address2 field set ok'); |
295 |
is( $borrower->B_address2, 'SmyB_address2', 'B_address2 field set ok' ); |
293 |
is( $borrower->B_city, 'SmyB_city', 'B_city field set ok'); |
296 |
is( $borrower->B_city, 'SmyB_city', 'B_city field set ok' ); |
294 |
is( $borrower->B_state, 'SmyB_state', 'B_state field set ok'); |
297 |
is( $borrower->B_state, 'SmyB_state', 'B_state field set ok' ); |
295 |
is( $borrower->B_zipcode, '12333', 'B_zipcode field set ok'); |
298 |
is( $borrower->B_zipcode, '12333', 'B_zipcode field set ok' ); |
296 |
is( $borrower->B_country, 'SmyB_country', 'B_country field set ok'); |
299 |
is( $borrower->B_country, 'SmyB_country', 'B_country field set ok' ); |
297 |
is( $borrower->B_email, 'SmyB_email', 'B_email field set ok'); |
300 |
is( $borrower->B_email, 'SmyB_email', 'B_email field set ok' ); |
298 |
is( $borrower->B_phone, '0678353936', 'B_phone field set ok'); |
301 |
is( $borrower->B_phone, '0678353936', 'B_phone field set ok' ); |
299 |
is( $borrower->dateofbirth, '1991-07-16', 'dateofbirth field set ok'); |
302 |
is( $borrower->dateofbirth, '1991-07-16', 'dateofbirth field set ok' ); |
300 |
is( $borrower->branchcode, 'SmyBranCode', 'branchcode field set ok'); |
303 |
is( $borrower->branchcode, 'SmyBranCode', 'branchcode field set ok' ); |
301 |
is( $borrower->categorycode, 'SmyCatCode', 'categorycode field set ok'); |
304 |
is( $borrower->categorycode, 'SmyCatCode', 'categorycode field set ok' ); |
302 |
is( $borrower->dateenrolled, '2014-03-19', 'dateenrolled field set ok'); |
305 |
is( $borrower->dateenrolled, '2014-03-19', 'dateenrolled field set ok' ); |
303 |
is( $borrower->dateexpiry, '2017-03-19', 'dateexpiry field set ok'); |
306 |
is( $borrower->dateexpiry, '2017-03-19', 'dateexpiry field set ok' ); |
304 |
is( $borrower->gonenoaddress, '1', 'gonenoaddress field set ok'); |
307 |
is( $borrower->gonenoaddress, '1', 'gonenoaddress field set ok' ); |
305 |
is( $borrower->lost, '1', 'lost field set ok'); |
308 |
is( $borrower->lost, '1', 'lost field set ok' ); |
306 |
is( $borrower->debarred, '2016-04-19', 'debarred field set ok'); |
309 |
is( $borrower->debarred, '2016-04-19', 'debarred field set ok' ); |
307 |
is( $borrower->debarredcomment, 'You are still debarred', 'debarredcomment field set ok'); |
310 |
is( $borrower->debarredcomment, 'You are still debarred', 'debarredcomment field set ok' ); |
308 |
is( $borrower->contactname, 'SmyContactname', 'contactname field set ok'); |
311 |
is( $borrower->contactname, 'SmyContactname', 'contactname field set ok' ); |
309 |
is( $borrower->contactfirstname, 'SmyContactfirstname', 'contactfirstname field set ok'); |
312 |
is( $borrower->contactfirstname, 'SmyContactfirstname', 'contactfirstname field set ok' ); |
310 |
is( $borrower->contacttitle, 'SmyContacttitle', 'contacttitle field set ok'); |
313 |
is( $borrower->contacttitle, 'SmyContacttitle', 'contacttitle field set ok' ); |
311 |
is( $borrower->guarantorid, '223454321', 'guarantorid field set ok'); |
314 |
is( $borrower->guarantorid, '223454321', 'guarantorid field set ok' ); |
312 |
is( $borrower->borrowernotes, 'Sborrowernotes', 'borrowernotes field set ok'); |
315 |
is( $borrower->borrowernotes, 'Sborrowernotes', 'borrowernotes field set ok' ); |
313 |
is( $borrower->relationship, 'SmyRelationship', 'relationship field set ok'); |
316 |
is( $borrower->relationship, 'SmyRelationship', 'relationship field set ok' ); |
314 |
is( $borrower->ethnicity, undef, 'ethnicity field set ok'); |
317 |
is( $borrower->ethnicity, undef, 'ethnicity field set ok' ); |
315 |
is( $borrower->ethnotes, undef, 'ethnotes field set ok'); |
318 |
is( $borrower->ethnotes, undef, 'ethnotes field set ok' ); |
316 |
is( $borrower->sex, 'F', 'sex field set ok'); |
319 |
is( $borrower->sex, 'F', 'sex field set ok' ); |
317 |
is( $borrower->password, 'zerzerzer#', 'password field set ok'); |
320 |
is( $borrower->password, 'zerzerzer#', 'password field set ok' ); |
318 |
is( $borrower->flags, '666666', 'flags field set ok'); |
321 |
is( $borrower->flags, '666666', 'flags field set ok' ); |
319 |
is( $borrower->userid, '98233', 'userid field set ok'); |
322 |
is( $borrower->userid, '98233', 'userid field set ok' ); |
320 |
is( $borrower->opacnote, 'SmyOpacnote', 'opacnote field set ok'); |
323 |
is( $borrower->opacnote, 'SmyOpacnote', 'opacnote field set ok' ); |
321 |
is( $borrower->contactnote, 'SmyContactnote', 'contactnote field set ok'); |
324 |
is( $borrower->contactnote, 'SmyContactnote', 'contactnote field set ok' ); |
322 |
is( $borrower->sort1, 'SmySort1', 'sort1 field set ok'); |
325 |
is( $borrower->sort1, 'SmySort1', 'sort1 field set ok' ); |
323 |
is( $borrower->sort2, 'SmySort2', 'sort2 field set ok'); |
326 |
is( $borrower->sort2, 'SmySort2', 'sort2 field set ok' ); |
324 |
is( $borrower->altcontactfirstname, 'SmyAltcontactfirstname', 'altcontactfirstname field set ok'); |
327 |
is( $borrower->altcontactfirstname, 'SmyAltcontactfirstname', 'altcontactfirstname field set ok' ); |
325 |
is( $borrower->altcontactsurname, 'SmyAltcontactsurname', 'altcontactsurname field set ok'); |
328 |
is( $borrower->altcontactsurname, 'SmyAltcontactsurname', 'altcontactsurname field set ok' ); |
326 |
is( $borrower->altcontactaddress1, 'SmyAltcontactaddress1', 'altcontactaddress1 field set ok'); |
329 |
is( $borrower->altcontactaddress1, 'SmyAltcontactaddress1', 'altcontactaddress1 field set ok' ); |
327 |
is( $borrower->altcontactaddress2, 'SmyAltcontactaddress2', 'altcontactaddress2 field set ok'); |
330 |
is( $borrower->altcontactaddress2, 'SmyAltcontactaddress2', 'altcontactaddress2 field set ok' ); |
328 |
is( $borrower->altcontactaddress3, 'SmyAltcontactaddress3', 'altcontactaddress3 field set ok'); |
331 |
is( $borrower->altcontactaddress3, 'SmyAltcontactaddress3', 'altcontactaddress3 field set ok' ); |
329 |
is( $borrower->altcontactstate, 'SmyAltcontactstate', 'altcontactstate field set ok'); |
332 |
is( $borrower->altcontactstate, 'SmyAltcontactstate', 'altcontactstate field set ok' ); |
330 |
is( $borrower->altcontactzipcode, '565843', 'altcontactzipcode field set ok'); |
333 |
is( $borrower->altcontactzipcode, '565843', 'altcontactzipcode field set ok' ); |
331 |
is( $borrower->altcontactcountry, 'SmyOtherCountry', 'altcontactcountry field set ok'); |
334 |
is( $borrower->altcontactcountry, 'SmyOtherCountry', 'altcontactcountry field set ok' ); |
332 |
is( $borrower->altcontactphone, 'SmyOtherphone', 'altcontactphone field set ok'); |
335 |
is( $borrower->altcontactphone, 'SmyOtherphone', 'altcontactphone field set ok' ); |
333 |
is( $borrower->smsalertnumber, '0683027347', 'smsalertnumber field set ok'); |
336 |
is( $borrower->smsalertnumber, '0683027347', 'smsalertnumber field set ok' ); |
334 |
is( $borrower->privacy, '667789', 'privacy field set ok'); |
337 |
is( $borrower->privacy, '667789', 'privacy field set ok' ); |
335 |
}; |
338 |
}; |
336 |
|
339 |
|
337 |
1; |
340 |
1; |
338 |
- |
|
|