1 | <?php |
||
24 | final class TaxonomyContext implements Context |
||
25 | { |
||
26 | /** |
||
27 | * @var RepositoryInterface |
||
28 | */ |
||
29 | private $taxonRepository; |
||
30 | |||
31 | /** |
||
32 | * @var FactoryInterface |
||
33 | */ |
||
34 | private $taxonFactory; |
||
35 | |||
36 | /** |
||
37 | * @var ObjectManager |
||
38 | */ |
||
39 | private $objectManager; |
||
40 | |||
41 | /** |
||
42 | * @param RepositoryInterface $taxonRepository |
||
43 | * @param FactoryInterface $taxonFactory |
||
44 | * @param ObjectManager $objectManager |
||
45 | */ |
||
46 | public function __construct( |
||
55 | |||
56 | /** |
||
57 | * @Given the store classifies its products as :firstTaxonName |
||
58 | * @Given the store classifies its products as :firstTaxonName and :secondTaxonName |
||
59 | * @Given the store classifies its products as :firstTaxonName, :secondTaxonName and :thirdTaxonName |
||
60 | */ |
||
61 | public function storeClassifiesItsProductsAs($firstTaxonName, $secondTaxonName = null, $thirdTaxonName = null) |
||
71 | |||
72 | /** |
||
73 | * @Given /^(it) (belongs to "[^"]+")$/ |
||
74 | */ |
||
75 | public function itBelongsTo(ProductInterface $product, TaxonInterface $taxon) |
||
81 | |||
82 | /** |
||
83 | * @param string $name |
||
84 | * |
||
85 | * @return TaxonInterface |
||
86 | */ |
||
87 | private function createTaxon($name) |
||
95 | |||
96 | /** |
||
97 | * @param string $name |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | private function getCodeFromName($name) |
||
105 | } |
||
106 |