PHPIDS
Current file: /home/mario/workspace/php-ids.org/trunk/lib/IDS/vendors/htmlpurifier/HTMLPurifier/AttrTransform/Name.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 1
16.67 %16.67%
16.67% 1 / 6
 
HTMLPurifier_AttrTransform_Name
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 1
16.67 %16.67%
16.67% 1 / 6
 public function transform($attr, $config, $context)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 5


       1                 : <?php                                                                     
       2                 :                                                                           
       3                 : /**                                                                       
       4                 :  * Pre-transform that changes deprecated name attribute to ID if necessary
       5                 :  */                                                                       
       6               1 : class HTMLPurifier_AttrTransform_Name extends HTMLPurifier_AttrTransform  
       7                 : {                                                                         
       8                 :                                                                           
       9                 :     public function transform($attr, $config, $context) {                 
      10               0 :         if (!isset($attr['name'])) return $attr;                          
      11               0 :         $id = $this->confiscateAttr($attr, 'name');                       
      12               0 :         if ( isset($attr['id']))   return $attr;                          
      13               0 :         $attr['id'] = $id;                                                
      14               0 :         return $attr;                                                     
      15                 :     }                                                                     
      16                 :                                                                           
      17                 : }                                                                         
      18                 :                                                                           

Generated by PHPUnit 3.2.20 and Xdebug 2.0.3 at Sat Jun 7 16:15:42 CEST 2008.