Skip to content

Commit 75d4ccc

Browse files
committed
Added test for disabled plugin does not exist warning
1 parent fec9461 commit 75d4ccc

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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\CatalogSearch\Helper\Data">
10+
<plugin name=<warning descr="This plugin does not exist to be disabled.">"plugin_which_does_not_exist"</warning> disabled="true" />
11+
</type>
12+
</config>

tests/com/magento/idea/magento2plugin/inspections/xml/PluginDeclarationInspectionTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ public void testPluginNameDuplicationWarningWontShow() {
3535
myFixture.testHighlighting(true, false, false);
3636
}
3737

38+
/**
39+
* Tests warning for disabling of non-existing plugin
40+
*/
41+
public void testDisabledNonExistingPlugin() {
42+
myFixture.configureByFile(getFixturePath(ModuleDiXml.FILE_NAME));
43+
myFixture.testHighlighting(true, false, false);
44+
}
45+
3846
/**
3947
* Tests whenever the duplication warning shows when the plugin name already
4048
* defined in the same di.xml file

0 commit comments

Comments
 (0)