1 | <?php namespace BuildR\TestTools\DataSetLoader\YAML; |
||
20 | class YAMLDataSetLoader implements DataSetLoaderInterface { |
||
21 | |||
22 | /** |
||
23 | * @type string |
||
24 | */ |
||
25 | protected $file; |
||
26 | |||
27 | /** |
||
28 | * @type \BuildR\TestTools\DataSetLoader\YAML\Parser\YAMLParserInterface |
||
29 | */ |
||
30 | protected $parser; |
||
31 | |||
32 | /** |
||
33 | * @type string|NULL |
||
34 | */ |
||
35 | private $dataSetName; |
||
36 | |||
37 | /** |
||
38 | * @type string |
||
39 | */ |
||
40 | private $content; |
||
41 | |||
42 | /** |
||
43 | * YAMLDataSetLoader constructor. |
||
44 | * |
||
45 | * @param string $file The laoded YAML file absolute location |
||
46 | * @param \BuildR\TestTools\DataSetLoader\YAML\Parser\YAMLParserInterface $parser |
||
47 | */ |
||
48 | 4 | public function __construct($file, YAMLParserInterface $parser = NULL) { |
|
58 | |||
59 | /** |
||
60 | * Set the data set name that returned in getResult. If no specific DataSet are |
||
61 | * selected, the first DataSet are selected. |
||
62 | * |
||
63 | * @param string $dataSetName |
||
64 | * |
||
65 | * @return \BuildR\TestTools\DataSetLoader\YAML\YAMLDataSetLoader |
||
66 | */ |
||
67 | 1 | public function setDataSet($dataSetName) { |
|
72 | |||
73 | /** |
||
74 | * Returns the current parser |
||
75 | * |
||
76 | * @return \BuildR\TestTools\DataSetLoader\YAML\Parser\YAMLParserInterface |
||
77 | */ |
||
78 | 2 | public function getParser() { |
|
81 | |||
82 | /** |
||
83 | * {@inheritDoc} |
||
84 | */ |
||
85 | 4 | public function load() { |
|
90 | |||
91 | /** |
||
92 | * {@inheritDoc} |
||
93 | */ |
||
94 | 2 | public function getResult() { |
|
103 | |||
104 | } |
||
105 |