APISonar


fr.adrienbrault.idea.symfony2plugin.action.ui.ServiceBuilder.OutputType.XML

> fr > adrienbrault > idea > symfony2plugin > action > ui > ServiceBuilder > OutputType > XML
fr APIs adrienbrault APIs idea APIs symfony2plugin APIs action APIs ui APIs ServiceBuilder APIs OutputType APIs XML APIs

Example 1
public void testBuildForClassWithoutParameter() {
        PsiFile dummyFile = YamlPsiElementFactory.createDummyFile(getProject(), "foo.yml", "services:\n  foobar: ~");
        ServiceBuilder serviceBuilder = new ServiceBuilder(Collections.emptyList(), dummyFile, false);

        assertEquals(
            "foobar:\n  class: Foobar",
            serviceBuilder.build(ServiceBuilder.OutputType.Yaml, "Foobar", "foobar")
        );

        assertEquals(
            "<service class=\"Foobar\" id=\"foobar\"/>",
            StringUtils.trim(serviceBuilder.build(ServiceBuilder.OutputType.XML, "Foobar", "foobar"))
        );
    }