File tree 3 files changed +40
-0
lines changed
completion/xml/PhpClassMemberCompletionRegistrar/diXmlMustHaveCompletion
project/magento2/vendor/magento/module-backend/Model/Source
tests/com/magento/idea/magento2plugin/completion/xml
3 files changed +40
-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 >
9
+ <type name =" Magento\Backend\Model\Source\YesNo" >
10
+ <arguments >
11
+ <argument name =" logger" xsi : type =" init_parameter" >Magento\Backend\Model\Source\YesNo::<caret ></argument >
12
+ </arguments >
13
+ </type >
14
+ </config >
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ class YesNo implements ArrayInterface
15
15
*/
16
16
private $ logger ;
17
17
18
+ /**
19
+ * Constant to hold test string
20
+ */
21
+ public const TEST_STRING = "Test string " ;
22
+
18
23
/**
19
24
* YesNo constructor.
20
25
*
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
+ import com .magento .idea .magento2plugin .magento .files .ModuleDiXml ;
9
+
10
+ public class PhpClassMemberCompletionRegistrarTest extends CompletionXmlFixtureTestCase {
11
+
12
+ /**
13
+ * Tests for completion of init_parameter argument value in di.xml.
14
+ */
15
+ public void testDiXmlMustHaveCompletion () {
16
+ final String filePath = this .getFixturePath (ModuleDiXml .FILE_NAME );
17
+ myFixture .configureByFile (filePath );
18
+
19
+ assertCompletionContains (filePath , "Magento\\ Backend\\ Model\\ Source\\ YesNo::TEST_STRING" );
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments