File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed
project/magento2/vendor/magento/module-catalog/etc
reference/xml/ObserverReferenceRegistrar/observerNameMustHaveReference
tests/com/magento/idea/magento2plugin/reference/xml Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 55 * See COPYING.txt for license details.
66 */
77-->
8-
9- < config xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance " xsi : noNamespaceSchemaLocation =" urn:magento:framework:Event/etc/events.xsd" >
8+ < config xmlns : xsi = " http://www.w3.org/2001/XMLSchema-instance "
9+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:Event/etc/events.xsd" >
1010 <event name =" test_event_in_test_class" >
1111 <observer name =" test_observer" instance =" Magento\Catalog\Observer\TestObserver" />
1212 </event >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
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:Event/etc/events.xsd" >
10+ <event name =" test_event_in_test_class" >
11+ <observer name =" test_obs<caret>erver" disabled =" true" />
12+ </event >
13+ </config >
Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ public void testObserverInstanceMustHaveReference() {
1818 assertHasReferencePhpClass ("Magento\\ Catalog\\ Observer\\ TestObserver" );
1919 }
2020
21+ /**
22+ * Tests for observer name reference in events.xml.
23+ */
24+ public void testObserverNameMustHaveReference () {
25+ myFixture .configureByFile (this .getFixturePath (ModuleEventsXml .FILE_NAME ));
26+
27+ assertHasReferenceToXmlAttributeValue ("test_observer" );
28+ }
29+
2130 /**
2231 * Tests for event name reference in events.xml.
2332 */
You can’t perform that action at this time.
0 commit comments