Skip to content

Commit 0ce78b4

Browse files
committed
add testing for controller as service completion #428
1 parent 6711d6c commit 0ce78b4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/fr/adrienbrault/idea/symfony2plugin/tests/routing/RoutingDefinitionTest.java

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public void setUp() throws Exception {
1515
super.setUp();
1616

1717
myFixture.copyFileToProject("services.yml", "services.yml");
18+
myFixture.copyFileToProject("routing.xml", "routing.xml");
1819

1920
myFixture.configureByText("classes.php", "<?php\n" +
2021
"namespace AppBundle;\n" +
@@ -103,4 +104,14 @@ public void testControllerAsServiceNavigation() {
103104

104105
}
105106

107+
public void testControllerAsServiceCompletion() {
108+
109+
assertCompletionContains(YAMLFileType.YML, "foo:\n" +
110+
" pattern: /\n" +
111+
" defaults: { _controller: app.hello_controller:<caret> }\n"
112+
, "app.hello_controller:indexAction"
113+
);
114+
115+
}
116+
106117
}

tests/fr/adrienbrault/idea/symfony2plugin/tests/routing/fixtures/routing.xml

+4
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@
88
<default key="_controller">AcmeDemoBundle:Demo:hello</default>
99
</route>
1010

11+
<route id="xml_route" path="/blog/{slug}">
12+
<default key="_controller">app.hello_controller:indexAction</default>
13+
</route>
14+
1115
</routes>

0 commit comments

Comments
 (0)