Overview

Namespaces

  • PHP
  • XSLTBenchmarking
    • Reports
    • RunnerConsole
    • TestsGenerator
    • TestsRunner

Classes

  • DriversContainer
  • Factory
  • Microtime
  • Printer

Exceptions

  • CollisionException
  • Exception
  • GenerateTemplateException
  • GenerateXmlException
  • InvalidArgumentException
  • InvalidStateException
  • LongLoopException
  • UnknownMethodException
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo
 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:         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:         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:         return new Reports\Report($testName, $templatePath);
63:     }
64: 
65: 
66: }
67: 
XSTL Benchmarking API documentation generated by ApiGen.
Generated using the TokenReflection library.