22 * Copyright © Magento, Inc. All rights reserved.
33 * See COPYING.txt for license details.
44 */
5+
56package com .magento .idea .magento2plugin .completion .xml ;
67
78import com .magento .idea .magento2plugin .magento .files .ModuleConfigXml ;
89import com .magento .idea .magento2plugin .magento .files .ModuleSystemXmlFile ;
910
1011public class BackendModelXmlCompletionRegistrarTest extends CompletionXmlFixtureTestCase {
1112
12- private static final String [] systemXmlBackendModelLookupStringCheck = new String [] {
13+ private static final String [] SYSTEM_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK = {
1314 "Magento\\ Backend\\ Model\\ Source\\ Roles"
1415 };
15- private static final String [] configXmlBackendModelLookupStringCheck = new String [] {
16+ private static final String [] CONFIG_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK = {
1617 "Magento\\ Backend\\ Model\\ Source\\ YesNo"
1718 };
1819
1920 public void testSystemXmlElementProvideCompletion () {
20- String filePath = this .getFixturePath (ModuleSystemXmlFile .FILE_NAME );
21+ final String filePath = this .getFixturePath (ModuleSystemXmlFile .FILE_NAME );
2122 myFixture .configureByFile (filePath );
2223
23- assertCompletionContains (filePath , systemXmlBackendModelLookupStringCheck );
24+ assertCompletionContains (filePath , SYSTEM_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK );
2425 }
2526
2627 public void testSystemXmlElementCompletionWontShow () {
27- String filePath = this .getFixturePath (
28+ final String filePath = this .getFixturePath (
2829 ModuleSystemXmlFile .FILE_NAME
2930 );
3031 myFixture .copyFileToProject (filePath );
@@ -33,35 +34,35 @@ public void testSystemXmlElementCompletionWontShow() {
3334 }
3435
3536 public void testSystemXmlBackendModelAttributeMatchWithFile () {
36- String filePath = this .getFixturePath (
37+ final String filePath = this .getFixturePath (
3738 ModuleSystemXmlFile .FILE_NAME
3839 );
3940
40- assertFileContainsCompletions (filePath , systemXmlBackendModelLookupStringCheck );
41+ assertFileContainsCompletions (filePath , SYSTEM_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK );
4142 }
4243
4344 public void testSystemXmlBackendModelAttributeDontMatchWithFile () {
44- String filePath = this .getFixturePath (
45+ final String filePath = this .getFixturePath (
4546 "other-file-than-system.xml"
4647 );
4748
4849 assertFileNotContainsCompletions (
4950 filePath ,
50- systemXmlBackendModelLookupStringCheck
51+ SYSTEM_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK
5152 );
5253 }
5354
5455 public void testConfigXmlElementProvideCompletion () {
55- String filePath = this .getFixturePath (
56+ final String filePath = this .getFixturePath (
5657 ModuleConfigXml .FILE_NAME
5758 );
5859 myFixture .copyFileToProject (filePath );
5960
60- assertCompletionContains (filePath , configXmlBackendModelLookupStringCheck );
61+ assertCompletionContains (filePath , CONFIG_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK );
6162 }
6263
6364 public void testConfigXmlElementCompletionWontShow () {
64- String filePath = this .getFixturePath (
65+ final String filePath = this .getFixturePath (
6566 ModuleConfigXml .FILE_NAME
6667 );
6768 myFixture .copyFileToProject (filePath );
@@ -70,21 +71,21 @@ public void testConfigXmlElementCompletionWontShow() {
7071 }
7172
7273 public void testConfigXmlBackendModelAttributeMatchWithFile () {
73- String filePath = this .getFixturePath (
74+ final String filePath = this .getFixturePath (
7475 ModuleConfigXml .FILE_NAME
7576 );
7677
77- assertFileContainsCompletions (filePath , configXmlBackendModelLookupStringCheck );
78+ assertFileContainsCompletions (filePath , CONFIG_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK );
7879 }
7980
8081 public void testConfigXmlBackendModelAttributeDontMatchWithFile () {
81- String filePath = this .getFixturePath (
82+ final String filePath = this .getFixturePath (
8283 "other-file-than-config.xml"
8384 );
8485
8586 assertFileNotContainsCompletions (
8687 filePath ,
87- configXmlBackendModelLookupStringCheck
88+ CONFIG_XML_BACKEND_MODEL_LOOKUP_STRING_CHECK
8889 );
8990 }
9091}
0 commit comments