mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-21 13:25:18 +00:00
ec4098c8fd
While we might never be able to have 100% of our code strict, we can at the very least do it for all of our tests. This ensures that our tests are using our API with the types as intended by the test author, and not silently be cast to what our API requires.
61 lines
1.3 KiB
PHP
61 lines
1.3 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
// Issue date, Settlement, Rate, Par, Basis, Result
|
|
|
|
return [
|
|
[
|
|
20.547945205478999,
|
|
'2008-04-01', '2008-06-15', 0.10, 1000, 3,
|
|
],
|
|
[
|
|
800,
|
|
'2010-01-01', '2010-12-31', 0.08, 10000,
|
|
],
|
|
[
|
|
800,
|
|
'2010-01-01', '2010-12-31', 0.08, 10000, null,
|
|
],
|
|
[
|
|
365.958904109589,
|
|
'2012-01-01', '2013-02-15', 0.065, 5000, 3,
|
|
],
|
|
[
|
|
73.1917808219178,
|
|
'2012-01-01', '2013-02-15', 0.065, 1000, 3,
|
|
],
|
|
[
|
|
'#NUM!',
|
|
'2008-03-05', '2008-08-31', -0.10, 1000, 2,
|
|
],
|
|
[
|
|
'#VALUE!',
|
|
'Invalid Date', '2008-08-31', 0.10, 1000, 2,
|
|
],
|
|
'Non-numeric Rate' => [
|
|
'#VALUE!',
|
|
'2008-03-01', '2008-08-31', 'NaN', 1000, 2,
|
|
],
|
|
'Invalid Rate' => [
|
|
'#NUM!',
|
|
'2008-03-01', '2008-08-31', -0.10, 1000, 2,
|
|
],
|
|
'Non-numeric Par Value' => [
|
|
'#VALUE!',
|
|
'2008-03-01', '2008-08-31', 0.10, 'NaN', 2,
|
|
],
|
|
'Invalid Par Value' => [
|
|
'#NUM!',
|
|
'2008-03-01', '2008-08-31', 0.10, -1000, 2,
|
|
],
|
|
'Non-numeric Basis' => [
|
|
'#VALUE!',
|
|
'2008-03-01', '2008-08-31', 0.10, 1000, 'NaN',
|
|
],
|
|
'Invalid Basis' => [
|
|
'#NUM!',
|
|
'2008-03-01', '2008-08-31', 0.10, 1000, 99,
|
|
],
|
|
];
|