phpunit.xml 用法



   
      action

      HuiyuanZhanghuOrder.php

     /action/HuiyuanJifenTest.php

   

    
   
      model
   

    
   
      html
   

   
   
   

    action
    ArrayTest.php
 

 
 
   action
   model
   html
   ArrayTest.php
   
   action/lib
   model
   action/lib/Loginxxx.php
   

 


    
   
    
       
         
 
 
 

   



   
 .
 
 
 
 
 
 
 
 
 
 
  


xml 解释

bootstrap="./booten.php"

在测试之前加载的的PHP 文件,一般可以做一个初始化工作



      action
      HuiyuanZhanghuOrder.php

测试套件,如果想测试页面,action,model 可以多加几个测试套件

name: 套件名称

directory :套件测试的目录,目录下一般放测试文件的用例

       suffix :测试文件后缀,如果不填写,则默认后缀为*Test.php,即phpunit 默认会执行*Test.php  的文件

       action:测试目录名

file:可以单独设置测试文件

exclude:排除不需要测试的文件



 
  .
  
  
  
  
  
  
  
  
  
  
  

这段xml 可以对应以下PHP 代码

includePath

ini_set('foo', 'bar');
define('foo', 'bar');
$GLOBALS['foo'] = 'bar';
$_ENV['foo'] = 'bar';
$_POST['foo'] = 'bar';
$_GET['foo'] = 'bar';
$_COOKIE['foo'] = 'bar';
$_SERVER['foo'] = 'bar';
$_FILES['foo'] = 'bar';
$_REQUEST['foo'] = 'bar';


phpunit.xml 应用网址http://www.phpunit.de/manual/3.6/en/appendixes.configuration.html#appendixes.configuration.blacklist-whitelist

你可能感兴趣的:(phpunit)