1 | <?php |
||
10 | class ExampleFactory |
||
11 | { |
||
12 | /** |
||
13 | * @var ExpectationFactory |
||
14 | */ |
||
15 | private $expectationFactory; |
||
16 | |||
17 | public function __construct(ExpectationFactory $expectationFactory = null) |
||
21 | |||
22 | /** |
||
23 | * Create examples from definitions |
||
24 | * |
||
25 | * @param array $defenitions Example definitions as created by Parser |
||
26 | * @return Example[] |
||
27 | */ |
||
28 | public function createExamples(array $defenitions) |
||
52 | |||
53 | /** |
||
54 | * Read name from example annotation |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | private function readName(array $annotations) |
||
68 | |||
69 | /** |
||
70 | * Check if this example is marked as ignored |
||
71 | * |
||
72 | * @return boolean |
||
73 | */ |
||
74 | private function shouldIgnoreExample(array $annotations) |
||
84 | |||
85 | /** |
||
86 | * Create expectation from definition data |
||
87 | * |
||
88 | * @return Expectation\ExpectationInterface[] |
||
89 | */ |
||
90 | private function createExpectations(array $annotations) |
||
100 | } |
||
101 |