Factory.php
Current file: C:\DATA\Viktor\Diplomka\XSLT-Benchmarking/XSLTBenchmarking/Factory.php
Legend: executed not executed dead code

  Coverage
  Classes Functions / Methods Lines
Total
100.00% 1 / 1
100.00% 3 / 3 CRAP
100.00% 3 / 3
Factory
100.00% 1 / 1
100.00% 3 / 3 3
100.00% 3 / 3
 getTestsGeneratorTest($name)
100.00% 1 / 1 1
100.00% 1 / 1
 getTestsRunnerTest($name)
100.00% 1 / 1 1
100.00% 1 / 1
 getReport($testName, $templatePath)
100.00% 1 / 1 1
100.00% 1 / 1



       1                 : <?php                                                             
       2                 :                                                                   
       3                 : /**                                                               
       4                 :  * XSLT Benchmarking                                              
       5                 :  * @link https://github.com/masicek/XSLT-Benchmarking             
       6                 :  * @author Viktor Mašíček <viktor@masicek.net>                 
       7                 :  * @license "New" BSD License                                     
       8                 :  */                                                               
       9                 :                                                                   
      10                 : namespace XSLTBenchmarking;                                       
      11                 :                                                                   
      12                 : require_once __DIR__ . '/TestsGenerator/Test.php';                
      13                 : require_once __DIR__ . '/TestsRunner/Test.php';                   
      14                 : require_once __DIR__ . '/Reports/Report.php';                     
      15                 :                                                                   
      16                 : /**                                                               
      17                 :  * Factory class for making new objects.                          
      18                 :  * It was created for better testing.                             
      19                 :  *                                                                
      20                 :  * @author Viktor Mašíček <viktor@masicek.net>                 
      21                 :  */                                                               
      22                 : class Factory                                                     
      23                 : {                                                                 
      24                 :                                                                   
      25                 :                                                                   
      26                 :     /**                                                           
      27                 :      * Make new Test class and return it                          
      28                 :      *                                                            
      29                 :      * @param string $name The human-redable name of the test     
      30                 :      *                                                            
      31                 :      * @return \XSLTBenchmarking\TestsGenerator\Test              
      32                 :      */                                                           
      33                 :     public function getTestsGeneratorTest($name)                  
      34                 :     {                                                             
      35               1 :         return new TestsGenerator\Test($name);                    
      36                 :     }                                                             
      37                 :                                                                   
      38                 :                                                                   
      39                 :     /**                                                           
      40                 :      * Make new Test class and return it                          
      41                 :      *                                                            
      42                 :      * @param string $name The human-redable name of the test     
      43                 :      *                                                            
      44                 :      * @return \XSLTBenchmarking\TestsRunner\Test                 
      45                 :      */                                                           
      46                 :     public function getTestsRunnerTest($name)                     
      47                 :     {                                                             
      48               1 :         return new TestsRunner\Test($name);                       
      49                 :     }                                                             
      50                 :                                                                   
      51                 :                                                                   
      52                 :     /**                                                           
      53                 :      * Make new Report class and return it                        
      54                 :      *                                                            
      55                 :      * @param string $testName Name of the reported test          
      56                 :      * @param string $templatePath Path of the tests XSLT template
      57                 :      *                                                            
      58                 :      * @return \XSLTBenchmarking\Reports\Report                   
      59                 :      */                                                           
      60                 :     public function getReport($testName, $templatePath)           
      61                 :     {                                                             
      62               1 :         return new Reports\Report($testName, $templatePath);      
      63                 :     }                                                             
      64                 :                                                                   
      65                 :                                                                   
      66                 : }                                                                 


Generated by PHP_CodeCoverage @package_version@ using PHP 5.3.6 and PHPUnit @package_version@ at Tue Jun 26 15:06:55 CEST 2012.