Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
b36b56b7
Commit
b36b56b7
authored
12 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Add PHPUnit test to validate calcul_price function for spain.
parent
e2d71b32
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/phpunit/PricesTest.php
+9
-0
9 additions, 0 deletions
test/phpunit/PricesTest.php
with
9 additions
and
0 deletions
test/phpunit/PricesTest.php
+
9
−
0
View file @
b36b56b7
...
@@ -150,6 +150,15 @@ class PricesTest extends PHPUnit_Framework_TestCase
...
@@ -150,6 +150,15 @@ class PricesTest extends PHPUnit_Framework_TestCase
print
__METHOD__
.
" value8=1.36 result8="
.
$result1
[
8
]
.
"
\n
"
;
print
__METHOD__
.
" value8=1.36 result8="
.
$result1
[
8
]
.
"
\n
"
;
$this
->
assertEquals
(
1.36
,
$result1
[
8
]);
$this
->
assertEquals
(
1.36
,
$result1
[
8
]);
$result2
=
calcul_price_total
(
10
,
10
,
0
,
10
,
1.4
,
0
,
0
,
'HT'
,
0
);
// 10 * 10 HT - 0% discount with 10% vat and 1.4% localtax1, 0% localtax2
print
__METHOD__
.
" value0=100 result0="
.
$result2
[
0
]
.
"
\n
"
;
$this
->
assertEquals
(
100
,
$result2
[
0
]);
print
__METHOD__
.
" value1=10 result1="
.
$result2
[
1
]
.
"
\n
"
;
$this
->
assertEquals
(
10
,
$result2
[
1
]);
print
__METHOD__
.
" value2=111.4 result2="
.
$result2
[
2
]
.
"
\n
"
;
$this
->
assertEquals
(
111.4
,
$result2
[
2
]);
return
true
;
return
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment