1 | <?php |
||
25 | class TestSuiteFactory implements IApplicationAware |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * Session strategy manager. |
||
30 | * |
||
31 | * @var SessionStrategyManager |
||
32 | */ |
||
33 | private $_sessionStrategyManager; |
||
34 | |||
35 | /** |
||
36 | * Application. |
||
37 | * |
||
38 | * @var Application |
||
39 | */ |
||
40 | protected $application; |
||
41 | |||
42 | /** |
||
43 | * Browser configuration factory. |
||
44 | * |
||
45 | * @var IBrowserConfigurationFactory |
||
46 | */ |
||
47 | private $_browserConfigurationFactory; |
||
48 | |||
49 | /** |
||
50 | * Remote coverage helper. |
||
51 | * |
||
52 | * @var RemoteCoverageHelper |
||
53 | */ |
||
54 | private $_remoteCoverageHelper; |
||
55 | |||
56 | /** |
||
57 | * Creates test suite builder instance. |
||
58 | * |
||
59 | * @param SessionStrategyManager $session_strategy_manager Session strategy manager. |
||
60 | * @param IBrowserConfigurationFactory $browser_configuration_factory Browser configuration factory. |
||
61 | * @param RemoteCoverageHelper $remote_coverage_helper Remote coverage helper. |
||
62 | */ |
||
63 | 6 | public function __construct( |
|
64 | SessionStrategyManager $session_strategy_manager, |
||
65 | IBrowserConfigurationFactory $browser_configuration_factory, |
||
66 | RemoteCoverageHelper $remote_coverage_helper |
||
67 | ) { |
||
68 | 6 | $this->_sessionStrategyManager = $session_strategy_manager; |
|
69 | 6 | $this->_browserConfigurationFactory = $browser_configuration_factory; |
|
70 | 6 | $this->_remoteCoverageHelper = $remote_coverage_helper; |
|
71 | 6 | } |
|
72 | |||
73 | /** |
||
74 | * Sets application. |
||
75 | * |
||
76 | * @param Application $application The application. |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | 6 | public function setApplication(Application $application) |
|
84 | |||
85 | /** |
||
86 | * Creates test suite based on given test case class. |
||
87 | * |
||
88 | * @param string $class_name Test case class name. |
||
89 | * |
||
90 | * @return AbstractTestSuite |
||
91 | */ |
||
92 | 6 | public function createSuiteFromTestCase($class_name) |
|
118 | |||
119 | /** |
||
120 | * Returns browser configuration of a class. |
||
121 | * |
||
122 | * @param string $class_name Test case class name. |
||
123 | * |
||
124 | * @return array |
||
125 | */ |
||
126 | 6 | private function _getBrowsers($class_name) |
|
133 | |||
134 | /** |
||
135 | * Creates browser suite. |
||
136 | * |
||
137 | * @param string $class_name Descendant of TestCase class. |
||
138 | * @param array $browser Browser configuration. |
||
139 | * |
||
140 | * @return BrowserTestSuite |
||
141 | */ |
||
142 | 3 | private function _createBrowserSuite($class_name, array $browser) |
|
158 | |||
159 | } |
||
160 |