All Unit tests
Current file: C:\code\midiparser\src\Midi\Event\ChannelPrefixEvent.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 3 / 3
100.00%100.00%
100.00% 5 / 5
 
Midi\ChannelPrefixEvent
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 3 / 3
100.00%100.00%
100.00% 5 / 5
 public function __construct($channel)
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 2 / 2
 public function getParamDescription()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1
 public function getSubtype()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1


       1                 : <?php                                                                 
       2                 :                                                                       
       3                 :     /**                                                               
       4                 :      * \Midi\Event\ChannelPrefixEvent                                 
       5                 :      *                                                                
       6                 :      * @package    Midi                                               
       7                 :      * @subpackage Event                                              
       8                 :      * @copyright  © 2009 Tommy Montgomery <http://phpmidiparser.com/>
       9                 :      * @since      1.0                                                
      10                 :      */                                                               
      11                 :                                                                       
      12                 :     namespace Midi\Event;                                             
      13                 :                                                                       
      14                 :     /**                                                               
      15                 :      * Represents the channel prefix meta event                       
      16                 :      *                                                                
      17                 :      * @package    Midi                                               
      18                 :      * @subpackage Event                                              
      19                 :      * @since      1.0                                                
      20                 :      * @todo       Document what this event actually does             
      21                 :      */                                                               
      22               1 :     class ChannelPrefixEvent extends MetaEvent {                      
      23                 :                                                                       
      24                 :         /**                                                           
      25                 :          * Constructor                                                
      26                 :          *                                                            
      27                 :          * @since 1.0                                                 
      28                 :          *                                                            
      29                 :          * @param  int $channel Valid values: 0-15                    
      30                 :          */                                                           
      31                 :         public function __construct($channel) {                       
      32               3 :             parent::__construct(array($channel));                     
      33               3 :         }                                                             
      34                 :                                                                       
      35                 :         /**                                                           
      36                 :          * @since 1.0                                                 
      37                 :          *                                                            
      38                 :          * @return string                                             
      39                 :          */                                                           
      40                 :         public function getParamDescription() {                       
      41               1 :             return 'channel: ' . $this->data[0];                      
      42                 :         }                                                             
      43                 :                                                                       
      44                 :         /**                                                           
      45                 :          * @since 1.0                                                 
      46                 :          * @uses  MetaEventType::CHANNEL_PREFIX                       
      47                 :          *                                                            
      48                 :          * @return int                                                
      49                 :          */                                                           
      50                 :         public function getSubtype() {                                
      51               1 :             return MetaEventType::CHANNEL_PREFIX;                     
      52                 :         }                                                             
      53                 :                                                                       
      54                 :     }                                                                 
      55                 :                                                                       

Generated by PHPUnit 3.4.1 and Xdebug 2.0.5 using PHP 5.3.0 at Sun Oct 25 23:35:09 PDT 2009.