@@ 155-168 (lines=14) @@ | ||
152 | * |
|
153 | * @covers ::import |
|
154 | */ |
|
155 | public function testImportWithInstalledDisabledPlugins() |
|
156 | { |
|
157 | $this->getMockBasePlugin(); |
|
158 | ||
159 | $data = $this->getPluginsData(); |
|
160 | $data[$this->pluginHandle]['isEnabled'] = false; |
|
161 | ||
162 | $this->mockMultipleServices(); |
|
163 | ||
164 | $import = $this->schematicPluginsService->import($data); |
|
165 | ||
166 | $this->assertTrue($import instanceof Result); |
|
167 | $this->assertFalse($import->hasErrors()); |
|
168 | } |
|
169 | ||
170 | /** |
|
171 | * Test default import functionality. |
|
@@ 175-186 (lines=12) @@ | ||
172 | * |
|
173 | * @covers ::import |
|
174 | */ |
|
175 | public function testImportWithMissingPlugin() |
|
176 | { |
|
177 | $data = $this->getPluginsData(); |
|
178 | ||
179 | $mockPluginsService = $this->getMockPluginsService(false); |
|
180 | $this->setComponent(Craft::app(), 'plugins', $mockPluginsService); |
|
181 | ||
182 | $import = $this->schematicPluginsService->import($data); |
|
183 | ||
184 | $this->assertTrue($import instanceof Result); |
|
185 | $this->assertTrue($import->hasErrors()); |
|
186 | } |
|
187 | ||
188 | /** |
|
189 | * Test default import functionality. |