[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 06/08: PHPUNIT : Acc_Compute
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 06/08: PHPUNIT : Acc_Compute |
Date: |
Tue, 24 Sep 2019 13:52:00 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 9cc52525e47a3030927f9c30bf81b32a2c24f7d4
Author: Dany De Bontridder <address@hidden>
Date: Sun Sep 22 15:49:41 2019 +0200
PHPUNIT : Acc_Compute
---
unit-test/include/class/acc_computeTest.class.php | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/unit-test/include/class/acc_computeTest.class.php
b/unit-test/include/class/acc_computeTest.class.php
index 1b19e5f..09b9386 100644
--- a/unit-test/include/class/acc_computeTest.class.php
+++ b/unit-test/include/class/acc_computeTest.class.php
@@ -155,7 +155,14 @@ class Acc_ComputeTest extends TestCase
*/
public function testCorrect()
{
+ $this->object->amount=100.0;
+ $this->object->amount_perso=15.3333;
+ $this->object->amount_vat=20.6666;
+ $this->object->amount_nd_vat=1.5;
$this->object->correct();
+ $this->assertEquals($this->object->amount,84.6667);
+ $this->assertEquals($this->object->amount_perso,15.3333);
+ $this->assertEquals($this->object->amount_vat,20.67);
}
/**
@@ -167,6 +174,7 @@ class Acc_ComputeTest extends TestCase
$this->object->verify();
$new=new Acc_Compute();
$this->object->verify($new);
+ $this->assertTrue(TRUE);
}
/**
@@ -176,7 +184,11 @@ class Acc_ComputeTest extends TestCase
*/
public function testDisplay()
{
+ ob_start();
$this->object->display();
+ $result= ob_get_flush();
+ $this->assertStringStartsWith("key amount Description amount value is
0<br>key amount_vat Description amount_vat value is 0<br>",$result);
+ $this->assertStringEndsWith("<br>key amount_perso_rate Description
amount_perso_rate value is 0<br>",$result);
}
/**
- [Noalyss-commit] [noalyss] branch master updated (1aa7a44 -> 7049cff), Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 02/08: Task #0001698: Problème affichage historique fiches, Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 01/08: task #0001698: Problème affichage historique fiches Prevent direct use of http_request translation Cosmetic, Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 06/08: PHPUNIT : Acc_Compute,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 07/08: Merge branch 'dev7100', Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 08/08: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss, Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 03/08: Task #0001703: Faciliter effacement montants dans les filtres, Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 05/08: documentation + traduction, Dany De Bontridder, 2019/09/24
- [Noalyss-commit] [noalyss] 04/08: Improve PHPUNIT Test for phpunit7 and phpunit8, Dany De Bontridder, 2019/09/24