File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed
testData/completion/xml/ModuleNameCompletionRegistrar
moduleNameMustHaveCompletion
sequenceModuleNameMustHaveCompletion
tests/com/magento/idea/magento2plugin/completion/xml Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <!--
3+ /**
4+ * Copyright © Magento, Inc. All rights reserved.
5+ * See COPYING.txt for license details.
6+ */
7+ -->
8+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
10+ <module name =" Magento_C<caret>" />
11+ </config >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <!--
3+ /**
4+ * Copyright © Magento, Inc. All rights reserved.
5+ * See COPYING.txt for license details.
6+ */
7+ -->
8+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
10+ <module name =" Magento_Theme" >
11+ <sequence >
12+ <module name =" Magento_C<caret>" />
13+ </sequence >
14+ </module >
15+ </config >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright © Magento, Inc. All rights reserved.
3+ * See COPYING.txt for license details.
4+ */
5+
6+ package com .magento .idea .magento2plugin .completion .xml ;
7+
8+ public class ModuleNameCompletionRegistrarTest extends CompletionXmlFixtureTestCase {
9+ private static final String [] LOOKUP_MODULE_NAMES = new String [] {
10+ "Magento_Catalog" ,
11+ "Magento_Config"
12+ };
13+
14+ /**
15+ * Tests for module name completion in module.xml
16+ */
17+ public void testModuleNameMustHaveCompletion () {
18+ final String filePath = this .getFixturePath ("module.xml" );
19+ myFixture .copyFileToProject (filePath );
20+
21+ assertFileContainsCompletions (filePath , LOOKUP_MODULE_NAMES );
22+ }
23+
24+ /**
25+ * Tests for module name completion under the sequence node in module.xml
26+ */
27+ public void testSequenceModuleNameMustHaveCompletion () {
28+ final String filePath = this .getFixturePath ("module.xml" );
29+ myFixture .copyFileToProject (filePath );
30+
31+ assertFileContainsCompletions (filePath , LOOKUP_MODULE_NAMES );
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments