From 2d0387d1624b5b7ed6b13b79b9d5a87ce9b6d12b Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Wed, 29 Jun 2022 19:14:22 +0200 Subject: [PATCH] test action --- Test/perl/test_action.pl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Test/perl/test_action.pl b/Test/perl/test_action.pl index 0f2e02ab8..5611dace2 100755 --- a/Test/perl/test_action.pl +++ b/Test/perl/test_action.pl @@ -5,6 +5,7 @@ use strict; use SL::DB; use SL::Form; use SL::LXDebug; +use SL::DB::Manager::MebilMapping; $::lxdebug = new LXDebug; #$::form = new Form; @@ -12,6 +13,8 @@ $::lxdebug = new LXDebug; #my $dbh = $::form->get_standard_dbh; SL::DB->register_db( + domain => 'KIVITENDO', + type => 'KIVITENDO', driver => 'Pg', database => 'firma', host => 'localhost', @@ -19,8 +22,17 @@ SL::DB->register_db( password => 'kivitendo', ); -my $db = SL::DB->new; +my $db = SL::DB->new(domain => 'KIVITENDO', + type => 'KIVITENDO',); my $dbh = $db->dbh; -my $m = new SL::Controller::Mebil; -$m->action_calcmap; +#$dbh->do("SELECT * FROM mebil_mapping"); + +#$db->begin_work or die $db->error; +#my $m = new SL::Controller::Mebil; +#$m->action_calcmap; +my $mappings = SL::DB::Manager::MebilMapping->get_objects(dbh => $dbh); + +foreach my $map (@$mappings) { + print ("$map\n"); +} -- 2.20.1