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


       1                 : <?php                                                                                                           
       2                 :                                                                                                                 
       3                 :     /**                                                                                                         
       4                 :      * \Midi\Event\ControllerEvent                                                                              
       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 controller updates for a particular channel                                                   
      16                 :      *                                                                                                          
      17                 :      * @package    Midi                                                                                         
      18                 :      * @subpackage Event                                                                                        
      19                 :      * @since      1.0                                                                                          
      20                 :      * @see        Controller                                                                                   
      21                 :      */                                                                                                         
      22               1 :     class ControllerEvent extends ChannelEvent {                                                                
      23                 :                                                                                                                 
      24                 :         /**                                                                                                     
      25                 :          * Gets a description of each controller type                                                           
      26                 :          *                                                                                                      
      27                 :          * @since 1.0                                                                                           
      28                 :          * @todo  Implement each controller type                                                                
      29                 :          *                                                                                                      
      30                 :          * @return string                                                                                       
      31                 :          */                                                                                                     
      32                 :         public function getControllerDetail() {                                                                 
      33               1 :             switch ($this->param1) {                                                                            
      34               1 :                 default:                                                                                        
      35               1 :                     return 'value [' . $this->param2 . ']';                                                     
      36               1 :             }                                                                                                   
      37                 :         }                                                                                                       
      38                 :                                                                                                                 
      39                 :         /**                                                                                                     
      40                 :          * @since 1.0                                                                                           
      41                 :          * @uses  Controller::getControllerName()                                                               
      42                 :          * @uses  getControllerDetail()                                                                         
      43                 :          *                                                                                                      
      44                 :          * @return string                                                                                       
      45                 :          */                                                                                                     
      46                 :         public function getParamDescription() {                                                                 
      47               1 :             return \Midi\Util\Controller::getControllerName($this->param1) . ' ' . $this->getControllerDetail();
      48                 :         }                                                                                                       
      49                 :                                                                                                                 
      50                 :         /**                                                                                                     
      51                 :          * @since 1.0                                                                                           
      52                 :          * @uses  EventType::CONTROLLER                                                                         
      53                 :          *                                                                                                      
      54                 :          * @return int                                                                                          
      55                 :          */                                                                                                     
      56                 :         public function getType() {                                                                             
      57               1 :             return EventType::CONTROLLER;                                                                       
      58                 :         }                                                                                                       
      59                 :                                                                                                                 
      60                 :     }                                                                                                           
      61                 :                                                                                                                 

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.