|
Lines 90-102
subtest 'patron_barcode_transform() and item_barcode_transform() hook tests' =>
Link Here
|
| 90 |
|
90 |
|
| 91 |
my $item; |
91 |
my $item; |
| 92 |
warning_like { $item = $builder->build_sample_item(); } |
92 |
warning_like { $item = $builder->build_sample_item(); } |
| 93 |
qr/Plugin error \(Test Plugin\): item_barcode_transform called with parameter: /, |
93 |
qr/Plugin error \(Test Plugin\): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: /, |
| 94 |
'Koha::Item->store calls the item_barcode_transform hook'; |
94 |
'Koha::Item->store calls the item_barcode_transform hook'; |
| 95 |
|
95 |
|
| 96 |
$item->barcode('THISISATEST'); |
96 |
$item->barcode('THISISATEST'); |
| 97 |
|
97 |
|
| 98 |
warning_is { $item->store(); } |
98 |
warning_like { $item->store(); } |
| 99 |
'Plugin error (Test Plugin): item_barcode_transform called with parameter: THISISATEST', |
99 |
qr/Plugin error \(Test Plugin\): Exception 'Koha::Exception' thrown 'item_barcode_transform called with parameter: THISISATEST'/, |
| 100 |
'Koha::Item->store calls the item_barcode_transform hook'; |
100 |
'Koha::Item->store calls the item_barcode_transform hook'; |
| 101 |
|
101 |
|
| 102 |
$schema->storage->txn_rollback; |
102 |
$schema->storage->txn_rollback; |
| 103 |
- |
|
|