1 | <?php |
||
23 | final class CurrencyContext implements Context |
||
24 | { |
||
25 | /** |
||
26 | * @var SharedStorageInterface |
||
27 | */ |
||
28 | private $sharedStorage; |
||
29 | |||
30 | /** |
||
31 | * @var RepositoryInterface |
||
32 | */ |
||
33 | private $currencyRepository; |
||
34 | |||
35 | /** |
||
36 | * @var FactoryInterface |
||
37 | */ |
||
38 | private $currencyFactory; |
||
39 | |||
40 | /** |
||
41 | * @var CurrencyNameConverterInterface |
||
42 | */ |
||
43 | private $currencyNameConverter; |
||
44 | |||
45 | /** |
||
46 | * @param SharedStorageInterface $sharedStorage |
||
47 | * @param RepositoryInterface $currencyRepository |
||
48 | * @param FactoryInterface $currencyFactory |
||
49 | * @param CurrencyNameConverterInterface $currencyNameConverter |
||
50 | */ |
||
51 | public function __construct( |
||
62 | |||
63 | /** |
||
64 | * @Given default currency is :currencyCode |
||
65 | */ |
||
66 | public function defaultCurrencyIs($currencyCode) |
||
76 | |||
77 | /** |
||
78 | * @Given the store has currency :currencyName |
||
79 | */ |
||
80 | public function theStoreHasCurrency($currencyName) |
||
84 | |||
85 | /** |
||
86 | * @Given the store has disabled currency :currencyName |
||
87 | */ |
||
88 | public function theStoreHasDisabledCurrency($currencyName) |
||
92 | |||
93 | /** |
||
94 | * @Given the store has currency :currencyName with exchange rate :exchangeRate |
||
95 | */ |
||
96 | public function theStoreHasCurrencyWithExchangeRate($currencyName, $exchangeRate) |
||
100 | |||
101 | /** |
||
102 | * @param string $currencyName |
||
103 | * @param bool $enabled |
||
104 | * @param float $exchangeRate |
||
105 | */ |
||
106 | private function createCurrency($currencyName, $enabled = true, $exchangeRate = 1.0) |
||
118 | } |
||
119 |