All Unit tests
Current file: C:\code\midiparser\src\Midi\Event\ProgramChangeEvent.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% 4 / 4
 
Midi\ProgramChangeEvent
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 3 / 3
100.00%100.00%
100.00% 4 / 4
 public function getParamDescription()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1
 public function getType()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1
 public function getLength()
100.00%100.00%
100.00% 1 / 1
100.00%100.00%
100.00% 1 / 1


       1                 : <?php                                                                      
       2                 :                                                                            
       3                 :     /**                                                                    
       4                 :      * \Midi\Event\ProgramChangeEvent                                      
       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 a program change event                                   
      16                 :      *                                                                     
      17                 :      * A program change is essentially an instrument change.               
      18                 :      * These events change the instrument of a channel.                    
      19                 :      *                                                                     
      20                 :      * @package    Midi                                                    
      21                 :      * @subpackage Event                                                   
      22                 :      * @since      1.0                                                     
      23                 :      */                                                                    
      24               1 :     class ProgramChangeEvent extends ChannelEvent {                        
      25                 :                                                                            
      26                 :         /**                                                                
      27                 :          * @since 1.0                                                      
      28                 :          * @uses  Instrument::getInstrumentName()                          
      29                 :          *                                                                 
      30                 :          * @return string                                                  
      31                 :          */                                                                
      32                 :         public function getParamDescription() {                            
      33               1 :             return \Midi\Util\Instrument::getInstrumentName($this->param1);
      34                 :         }                                                                  
      35                 :                                                                            
      36                 :         /**                                                                
      37                 :          * @since 1.0                                                      
      38                 :          * @uses  EventType::PROGRAM_CHANGE                                
      39                 :          *                                                                 
      40                 :          * @return int                                                     
      41                 :          */                                                                
      42                 :         public function getType() {                                        
      43               1 :             return EventType::PROGRAM_CHANGE;                              
      44                 :         }                                                                  
      45                 :                                                                            
      46                 :         /**                                                                
      47                 :          * @since 1.0                                                      
      48                 :          *                                                                 
      49                 :          * @return int                                                     
      50                 :          */                                                                
      51                 :         public function getLength() {                                      
      52               1 :             return 2;                                                      
      53                 :         }                                                                  
      54                 :                                                                            
      55                 :     }                                                                      
      56                 :                                                                            

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.