• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 教你一步一步寫一個phpunit testcase(16)

    發表于:2017-06-01來源:葉左左作者:葉左左點擊數: 標簽:PHPUnit
    filter whitelist processUncoveredFilesFromWhitelist = true directory suffix = .php ../src / directory / whitelist / filter / phpunit 加入bootstrap和filter屬性。 執行測試,如果XML名字不是
    > <filter> <whitelist processUncoveredFilesFromWhitelist="true"> <directory suffix=".php">../src</directory> </whitelist> </filter> </phpunit>

    加入bootstrap和filter屬性。

    執行測試,如果XML名字不是phpunit.xml的話,可以利用--configuration來指定。

    直接執行,結果如下:

    ?  how-to-write-a-phpunit-testcase git:(master) ? phpunit tests/EventTest.php
    PHPUnit 5.4.8 by Sebastian Bergmann and contributors.
    
    Runtime:       PHP 7.0.12 with Xdebug 2.4.0
    Configuration: /Users/wangzhihao/git/how-to-write-a-phpunit-testcase/phpunit.xml
    
    .....                                                               5 / 5 (100%)
    
    Time: 101 ms, Memory: 10.00MB
    
    OK (5 tests, 17 assertions)

    還有更多的phpunit.xml在這里https://phpunit.de/manual/current/en/appendixes.configuration.html

    Code Coverage 分析

    寫好單元測試之后,該如何了解到哪些程序還沒有經過測試?目標程序被測試百分比有多少?

    原文轉自:http://www.jianshu.com/p/ba6829a6f3ec

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>