dpw5865 2013-09-27 03:49
浏览 17

对将数字转换为文本字符串的类进行自动测试

I created a PHP class that converts integers and floats to text strings. For example:

  • 40300 -> forty-thousand three hundred
  • 503.23 -> five hundred twenty-three and 23/100

I need to create an automated test for this class. (I'm doing this to demonstrate my knowledge of test-driven development as part of a programming challenge.)

Someone recommended that I look into PHPUnit as a starting point. What's the best way to write an automated test in PHP (using PHPUnit or another framework) for a simple class that converts integers and floats to text strings?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
    • ¥50 成都蓉城足球俱乐部小程序抢票
    • ¥15 yolov7训练自己的数据集
    • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
    • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
    • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)