Skip to content

Commit 96f0f93

Browse files
committed
Added test coverage for PhpConstructorArgumentCompletionProvider
1 parent 4bf8869 commit 96f0f93

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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\Backend\Model\Source\YesNo">
10+
<arguments>
11+
<argument name="<caret>" xsi:type="object">Foo\Bar\Model\Logger</argument>
12+
</arguments>
13+
</type>
14+
</config>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
import com.magento.idea.magento2plugin.magento.files.ModuleDiXml;
9+
10+
public class ConstructorArgumentCompletionRegistrarTest extends CompletionXmlFixtureTestCase {
11+
12+
/**
13+
* Tests for completion of constructor argument in di.xml.
14+
*/
15+
public void testDiXmlMustHaveCompletion() {
16+
String filePath = this.getFixturePath(ModuleDiXml.FILE_NAME);
17+
myFixture.copyFileToProject(filePath);
18+
19+
assertFileContainsCompletions(filePath, "logger");
20+
}
21+
}

0 commit comments

Comments
 (0)