Revision 07b6482f
Von Werner Hahn vor mehr als 6 Jahren hinzugefügt
SL/Dev/Shop.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
use base qw(Exporter); |
5 |
our @EXPORT = qw(create_shop create_shop_part create_shop_order); |
|
5 |
use Data::Dumper; |
|
6 |
our @EXPORT_OK = qw(new_shop new_shop_part new_shop_order); |
|
7 |
our %EXPORT_TAGS = (ALL => \@EXPORT_OK); |
|
6 | 8 |
|
7 | 9 |
use SL::DB::Shop; |
8 | 10 |
|
9 |
sub create_shop {
|
|
11 |
sub new_shop {
|
|
10 | 12 |
my (%params) = @_; |
11 | 13 |
|
12 | 14 |
my $shop = SL::DB::Shop->new( |
13 |
description => 'testshop', |
|
15 |
description => delete $params{description} || 'testshop',
|
|
14 | 16 |
%params |
15 | 17 |
); |
16 | 18 |
return $shop; |
17 | 19 |
} |
18 | 20 |
|
19 |
sub create_shop_part {
|
|
21 |
sub new_shop_part {
|
|
20 | 22 |
my (%params) = @_; |
21 | 23 |
|
22 | 24 |
my $part = delete $params{part}; |
... | ... | |
30 | 32 |
return $shop_part; |
31 | 33 |
} |
32 | 34 |
|
33 |
sub create_shop_order {
|
|
35 |
sub new_shop_order {
|
|
34 | 36 |
my (%params) = @_; |
35 | 37 |
|
36 | 38 |
my $shop_order = SL::DB::ShopOrder->new( |
Auch abrufbar als: Unified diff
Shopmodul: Test für Shoporders