fix: set default x12 partner for item in billing manager (#7513)
[openemr.git] / tests / old_unit_dir / NumberToTextTest.php
blob5a80f707654d0a92c51819d1ba08212dca7d29cc
1 <?php
3 /* Copyright © 2010 by Andrew Moore */
4 /* Licensing information appears at the end of this file. */
5 namespace OpenEMR\Tests\Unit;
7 require_once dirname(__FILE__) . '/../../vendor/autoload.php';
9 use NumberToText;
10 use PHPUnit\Framework\TestCase;
12 class NumberToTextTest extends TestCase
14 /**
15 * @dataProvider cases
17 public function testConvert($numeral, $text)
19 $ntt = new NumberToText($numeral);
20 $this->assertEquals($text, $ntt->convert(), "'$numeral' converts to '$text'");
22 public static function cases()
24 return array( array( 0, 'zero'),
25 array( 1, 'one'),
26 array( 14000, 'fourteen thousand'),
27 array( 9, 'nine'),
28 array( 99, 'ninety-nine'),
29 array( 100, 'one hundred'),
30 array( 1000, 'one thousand'),
31 array( 1111, 'one thousand one hundred eleven'),
36 This file is free software: you can redistribute it and/or modify it under the
37 terms of the GNU General Public License as publish by the Free Software
38 Foundation.
39 This file is distributed in the hope that it will be useful, but WITHOUT ANY
40 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
41 PARTICULAR PURPOSE. See the GNU Gneral Public License for more details.
42 You should have received a copy of the GNU General Public Licence along with
43 this file. If not see <http://www.gnu.org/licenses/>.