File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
tests/Omnipay/Common/Message Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,18 @@ public function testAmountPrecision()
122
122
$ this ->assertSame ('0.01 ' , $ this ->request ->getAmount ());
123
123
}
124
124
125
+ /**
126
+ * @expectedException Omnipay\Common\Exception\InvalidRequestException
127
+ *
128
+ * We still want to catch obvious fractions of the minor units that are
129
+ * not precision errors at a much lower level.
130
+ */
131
+ public function testAmountPrecisionTooHigh ()
132
+ {
133
+ $ this ->assertSame ($ this ->request , $ this ->request ->setAmount ('123.005 ' ));
134
+ $ this ->assertSame ('123.005 ' , $ this ->request ->getAmount ());
135
+ }
136
+
125
137
public function testGetAmountNoDecimals ()
126
138
{
127
139
$ this ->assertSame ($ this ->request , $ this ->request ->setCurrency ('JPY ' ));
You can’t perform that action at this time.
0 commit comments