Skip to content

Commit 5bfba9c

Browse files
author
Vasilii Burlacu
committed
Covert PHP class completion for backend_model & tests refactoring
Refactored the implementation for SourceModelXmlCompletionRegistrarTest.java to match the new pattern for test fixtures
1 parent 0a4cdc2 commit 5bfba9c

File tree

18 files changed

+416
-19
lines changed

18 files changed

+416
-19
lines changed

src/com/magento/idea/magento2plugin/magento/files/ModuleConfigXml.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
package com.magento.idea.magento2plugin.magento.files;
66

77
public class ModuleConfigXml {
8+
public static final String FILE_NAME = "config.xml";
89
public static final String XML_ATTRIBUTE_BACKEND_MODEL = "backend_model";
910
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9+
<default>
10+
<payment>
11+
<test>
12+
<test backend_model="Yesno<caret>" />
13+
</test>
14+
</payment>
15+
</default>
16+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9+
<default>
10+
<payment>
11+
<test>
12+
<test backend_model="Yesno<caret>" />
13+
</test>
14+
</payment>
15+
</default>
16+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9+
<default>
10+
<payment>
11+
<test>
12+
<test backend_model="NotExistentClass<caret>" />
13+
</test>
14+
</payment>
15+
</default>
16+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9+
<default>
10+
<payment>
11+
<test>
12+
<test backend_model="Yesno<caret>" />
13+
</test>
14+
</payment>
15+
</default>
16+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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:module:Magento_Config:etc/system_file.xsd">
10+
<system>
11+
<section id="catalog">
12+
<group id="test">
13+
<field id="test">
14+
<label>Test suit to check completion WON'T work for backend_model tag</label>
15+
<backend_model>Roles<caret></backend_model>
16+
</field>
17+
</group>
18+
</section>
19+
</system>
20+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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:module:Magento_Config:etc/system_file.xsd">
10+
<system>
11+
<section id="catalog">
12+
<group id="test">
13+
<field id="test">
14+
<label>Test suit to check completion for backend_model tag exactly in system.xml file</label>
15+
<backend_model>Roles<caret></backend_model>
16+
</field>
17+
</group>
18+
</section>
19+
</system>
20+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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:module:Magento_Config:etc/system_file.xsd">
10+
<system>
11+
<section id="catalog">
12+
<group id="test">
13+
<field id="test">
14+
<label>Test suit to check missing completion for backend_model tag</label>
15+
<backend_model>NotExistingSource<caret></backend_model>
16+
</field>
17+
</group>
18+
</section>
19+
</system>
20+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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:module:Magento_Config:etc/system_file.xsd">
10+
<system>
11+
<section id="catalog">
12+
<group id="test">
13+
<field id="test">
14+
<label>Test suit to check completion for backend_model tag</label>
15+
<backend_model>Roles<caret></backend_model>
16+
</field>
17+
</group>
18+
</section>
19+
</system>
20+
</config>

0 commit comments

Comments
 (0)