doushi7819 2015-09-14 04:15
浏览 95
已采纳

symfony2不了解单元测试的输出

i'm new to symfony2, and learning how to do unit test in this framework, i created the php "calculator" and the test class following the tutorial http://symfony.com/doc/current/book/testing.html

C:\xampp\htdocs\sym1\blog>phpunit -c app src/AppBundle/Tests/Util/CalculatorTest
.php
PHPUnit 3.7.21 by Sebastian Bergmann.

Configuration read from C:\xampp\htdocs\sym1\blog\app\phpunit.xml.dist

.

Time: 0 seconds, Memory: 3.00Mb

[30;42m[2KOK (1 test, 1 assertion)
[0m[2K

I ran the command, but I don't understand the output, what is the meaning of this output?

Time: 0 seconds, Memory: 3.00Mb

[30;42m[2KOK (1 test, 1 assertion)
[0m[2K
  • 写回答

1条回答 默认 最新

  • doushiposong30622 2015-09-14 06:56
    关注

    That means that you had:

    one test: which means you have in total one method (name starting with test) in all test classes (ones which name ends with Test)

    one assertion: in all of your tests you had one $this->assert* call (like assertTrue, assertFalse etc)

    Notice also one . (dot) above Time 0 seconds. A dot represents test which was successfull (there were no tests failure). More test you have, more dots printed. Dots will turn into F in case of failure, E in case of error - some more options are possible.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何使用simulink建立一个永磁同步直线电机模型?
  • ¥30 天体光谱图的的绘制并得到星表
  • ¥15 PointNet++的onnx模型只能使用一次
  • ¥20 西南科技大学数字信号处理
  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥15 R语言绘制密度图,一个密度曲线内fill不同颜色如何实现
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗