1 | <?php |
||
27 | class CountriesTest extends BaseTest |
||
28 | { |
||
29 | //============================================================================================================== |
||
30 | //================================================= TESTS ==================================================== |
||
31 | //============================================================================================================== |
||
32 | |||
33 | /** |
||
34 | * @covers ::export |
||
35 | * @dataProvider provideValidCountries |
||
36 | * |
||
37 | * @param CountryModel[] $countries |
||
38 | * @param array $expectedResult |
||
39 | */ |
||
40 | public function testSuccessfulExport(array $countries, array $expectedResult = []) |
||
48 | |||
49 | /** |
||
50 | * @covers ::import |
||
51 | * @dataProvider provideValidCountryDefinitions |
||
52 | * |
||
53 | * @param array $countryDefinitions |
||
54 | */ |
||
55 | public function testSuccessfulImport(array $countryDefinitions) |
||
67 | |||
68 | /** |
||
69 | * @covers ::import |
||
70 | * @dataProvider provideValidCountryDefinitions |
||
71 | * |
||
72 | * @param array $countryDefinitions |
||
73 | */ |
||
74 | public function testImportWithForceOption(array $countryDefinitions) |
||
86 | |||
87 | //============================================================================================================== |
||
88 | //============================================== PROVIDERS =================================================== |
||
89 | //============================================================================================================== |
||
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | public function provideValidCountries() |
||
126 | |||
127 | /** |
||
128 | * @return array |
||
129 | */ |
||
130 | public function provideValidCountryDefinitions() |
||
146 | |||
147 | //============================================================================================================== |
||
148 | //================================================= MOCKS ==================================================== |
||
149 | //============================================================================================================== |
||
150 | |||
151 | /** |
||
152 | * @param string $countryId |
||
153 | * |
||
154 | * @return Mock|CountryModel |
||
155 | */ |
||
156 | private function getMockCountry($countryId) |
||
178 | |||
179 | /** |
||
180 | * @return Mock|CategoriesService |
||
181 | */ |
||
182 | private function setMockCountriesService() |
||
197 | |||
198 | /** |
||
199 | * @return Mock|DbConnection |
||
200 | */ |
||
201 | private function setMockDbConnection() |
||
216 | |||
217 | /** |
||
218 | * @return Mock|DbCommand |
||
219 | */ |
||
220 | private function getMockDbCommand() |
||
229 | } |
||
230 |