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';
10 use PHPUnit\Framework\TestCase
;
12 class NumberToTextTest
extends TestCase
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'),
26 array( 14000, 'fourteen thousand'),
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
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/>.