File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
testData/completion/xml/PhpServiceMethodCompletionRegistrar/webApiXmlMustHaveCompletion
tests/com/magento/idea/magento2plugin/completion/xml Expand file tree Collapse file tree 2 files changed +38
-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
+ <routes xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
9
+ xsi : noNamespaceSchemaLocation =" urn:magento:module:Magento_Webapi:etc/webapi.xsd" >
10
+
11
+ <!-- Product Service -->
12
+ <route url =" /V1/products" method =" POST" >
13
+ <service class =" Magento\Catalog\Api\ProductRepositoryInterface" method =" <caret>" />
14
+ <resources >
15
+ <resource ref =" Magento_Catalog::products" />
16
+ </resources >
17
+ </route >
18
+
19
+ </routes >
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
+ public class PhpServiceMethodCompletionRegistrarTest extends CompletionXmlFixtureTestCase {
9
+
10
+ /**
11
+ * Tests for the completion in `method` attribute of the `service` tag in webapi.xml.
12
+ */
13
+ public void testWebApiXmlMustHaveCompletion () {
14
+ final String filePath = this .getFixturePath ("webapi.xml" );
15
+ myFixture .configureByFile (filePath );
16
+
17
+ assertCompletionContains (filePath , "save" );
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments