From 07f215d0eeed76aba7b623c56529d57fb8277805 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Thu, 19 Aug 2021 11:52:53 +0200 Subject: [PATCH] PHPUNIT : fiche adapt to Postgresql 10.0 --- include/sql/patch/upgrade165.sql | 2 +- unit-test/include/class/fiche.Test.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/sql/patch/upgrade165.sql b/include/sql/patch/upgrade165.sql index ac6022953..37940457a 100644 --- a/include/sql/patch/upgrade165.sql +++ b/include/sql/patch/upgrade165.sql @@ -160,7 +160,7 @@ LANGUAGE plpgsql; create trigger fiche_detail_check_trg before update or insert on - public.fiche_detail for each row execute function comptaproc.fiche_detail_check() ; + public.fiche_detail for each row execute procedure comptaproc.fiche_detail_check() ; insert into version (val,v_description) values (166,'Fix bug for card with empty name or quickcode'); diff --git a/unit-test/include/class/fiche.Test.php b/unit-test/include/class/fiche.Test.php index c46ecb390..77175bb73 100644 --- a/unit-test/include/class/fiche.Test.php +++ b/unit-test/include/class/fiche.Test.php @@ -453,7 +453,7 @@ where ); } /** - * @testdox Test if it is possible to insert or update a empty name + * @testdox Test if it is possible to insert an empty name * @dataProvider dataInsertName */ public function testInsertName($p_name,$p_result) @@ -465,6 +465,7 @@ where $fiche->insert(2, ['av_text23' => 'QC', "av_text1" => $p_name]); $fiche->load(); $this->assertEquals($p_result,$fiche->strAttribut(ATTR_DEF_NAME),'incorrect name'); + $fiche->remove(); } /**