1 | <?php |
||
27 | class PaymentCurrenciesTest extends BaseTest |
||
28 | { |
||
29 | //============================================================================================================== |
||
30 | //================================================= TESTS ==================================================== |
||
31 | //============================================================================================================== |
||
32 | |||
33 | /** |
||
34 | * @covers ::export |
||
35 | * @dataProvider provideValidPaymentCurrencies |
||
36 | * |
||
37 | * @param PaymentCurrencyModel[] $currencies |
||
38 | * @param array $expectedResult |
||
39 | */ |
||
40 | public function testSuccessfulExport(array $currencies, array $expectedResult = []) |
||
48 | |||
49 | /** |
||
50 | * @covers ::import |
||
51 | * @dataProvider provideValidPaymentCurrencyDefinitions |
||
52 | * |
||
53 | * @param array $currencyDefinitions |
||
54 | */ |
||
55 | public function testSuccessfulImport(array $currencyDefinitions) |
||
67 | |||
68 | /** |
||
69 | * @covers ::import |
||
70 | * @dataProvider provideValidPaymentCurrencyDefinitions |
||
71 | * |
||
72 | * @param array $currencyDefinitions |
||
73 | */ |
||
74 | public function testImportWithForceOption(array $currencyDefinitions) |
||
86 | |||
87 | //============================================================================================================== |
||
88 | //============================================== PROVIDERS =================================================== |
||
89 | //============================================================================================================== |
||
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | public function provideValidPaymentCurrencies() |
||
129 | |||
130 | /** |
||
131 | * @return array |
||
132 | */ |
||
133 | public function provideValidPaymentCurrencyDefinitions() |
||
150 | |||
151 | //============================================================================================================== |
||
152 | //================================================= MOCKS ==================================================== |
||
153 | //============================================================================================================== |
||
154 | |||
155 | /** |
||
156 | * @param string $currencyId |
||
157 | * |
||
158 | * @return Mock|PaymentCurrencyModel |
||
159 | */ |
||
160 | private function getMockPaymentCurrency($currencyId) |
||
181 | |||
182 | /** |
||
183 | * @return Mock|CategoriesService |
||
184 | */ |
||
185 | private function setMockPaymentCurrenciesService() |
||
200 | |||
201 | /** |
||
202 | * @return Mock|DbConnection |
||
203 | */ |
||
204 | private function setMockDbConnection() |
||
219 | |||
220 | /** |
||
221 | * @return Mock|DbCommand |
||
222 | */ |
||
223 | private function getMockDbCommand() |
||
232 | } |
||
233 |