1 | <?php |
||
5 | abstract class TestFactory |
||
6 | { |
||
7 | /** |
||
8 | * @var string|null |
||
9 | */ |
||
10 | private $category = null; |
||
11 | |||
12 | /** |
||
13 | * @var TestData |
||
14 | */ |
||
15 | private $testData; |
||
16 | |||
17 | /** |
||
18 | * @var TestConfiguration|null |
||
19 | */ |
||
20 | private $configuration = null; |
||
21 | |||
22 | /** |
||
23 | * @var TestResult |
||
24 | */ |
||
25 | private $testResult; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $messages = array(); |
||
31 | |||
32 | /** |
||
33 | * @param string $category |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | protected function setCategory($category) |
||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getCategory() |
||
51 | |||
52 | /** |
||
53 | * @param TestConfiguration|null $configuration |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | protected function setConfiguration($configuration = null) |
||
64 | |||
65 | /** |
||
66 | * @return TestConfiguration |
||
67 | */ |
||
68 | public function getConfiguration() |
||
73 | |||
74 | /** |
||
75 | * @return TestData|null |
||
76 | */ |
||
77 | public function getTestData() |
||
82 | |||
83 | /** |
||
84 | * @param TestData|null $testData |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | protected function setTestData($testData = null) |
||
95 | |||
96 | /** |
||
97 | * @param TestResult $testResult |
||
98 | * |
||
99 | * @return void |
||
100 | */ |
||
101 | protected function setTestResult($testResult) |
||
106 | |||
107 | /** |
||
108 | * @return TestResult |
||
109 | */ |
||
110 | public function getTestResult() |
||
115 | |||
116 | /** |
||
117 | * @return array |
||
118 | */ |
||
119 | public function getMessages() |
||
124 | |||
125 | /** |
||
126 | * @return void |
||
127 | */ |
||
128 | protected function setMessages($messages) |
||
133 | |||
134 | /** |
||
135 | * @param array $messages |
||
136 | * @param string|null $index |
||
137 | * |
||
138 | * @return void |
||
139 | */ |
||
140 | protected function addMessages($messages, $index = null) |
||
150 | |||
151 | /** |
||
152 | * @param State $state |
||
153 | * @param string $category |
||
154 | * @param string $subject |
||
155 | * @param string $message |
||
156 | * |
||
157 | * @return void |
||
158 | */ |
||
159 | protected function addMessage($state, $category, $subject, $message) |
||
164 | } |
||
165 |