Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
package
money
Commits
a7efa509
Commit
a7efa509
authored
Mar 23, 2013
by
Mathias Verraes
Browse files
replace inline dataset with dataprovider
parent
72e1e617
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/Money/Tests/MoneyTest.php
View file @
a7efa509
...
...
@@ -208,7 +208,7 @@ class MoneyTest extends PHPUnit_Framework_TestCase
$this
->
assertFalse
(
Money
::
EUR
(
-
1
)
->
isPositive
());
}
p
rivate
function
moneys
trings
()
p
ublic
static
function
provideS
trings
()
{
return
array
(
array
(
"1000"
,
100000
),
...
...
@@ -229,10 +229,11 @@ class MoneyTest extends PHPUnit_Framework_TestCase
);
}
public
function
testStringToUnits
()
/**
* @dataProvider provideStrings
*/
public
function
testStringToUnits
(
$string
,
$units
)
{
foreach
(
$this
->
moneystrings
()
as
$array
)
{
$this
->
assertEquals
(
$array
[
1
],
Money
::
stringToUnits
(
$array
[
0
]));
}
$this
->
assertEquals
(
$units
,
Money
::
stringToUnits
(
$string
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment