Code Duplication    Length = 9-53 lines in 5 locations

eZ/Bundle/EzPublishCoreBundle/Tests/Imagine/Filter/Loader/SwirlFilterLoaderTest.php 1 location

@@ 71-79 (lines=9) @@
68
        $this->assertSame($image, $this->loader->load($image, array($degrees)));
69
    }
70
71
    public function loadWithOptionProvider()
72
    {
73
        return array(
74
            array(10),
75
            array(60),
76
            array(60.34),
77
            array(180.123),
78
        );
79
    }
80
}
81

eZ/Publish/Core/FieldType/Tests/RichText/Converter/LinkTest.php 1 location

@@ 56-108 (lines=53) @@
53
    /**
54
     * @return array
55
     */
56
    public function providerLinkXmlSample()
57
    {
58
        return array(
59
            array(
60
                '<?xml version="1.0" encoding="UTF-8"?>
61
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
62
  <title>Link example</title>
63
  <para>
64
    <link xlink:href="/test">Link text</link>
65
  </para>
66
</section>',
67
                '<?xml version="1.0" encoding="UTF-8"?>
68
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
69
  <title>Link example</title>
70
  <para>
71
    <link xlink:href="/test">Link text</link>
72
  </para>
73
</section>',
74
            ),
75
            array(
76
                '<?xml version="1.0" encoding="UTF-8"?>
77
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
78
  <title>Link example</title>
79
  <para>
80
    <link xlink:href="/test#anchor">Link text</link>
81
  </para>
82
</section>',
83
                '<?xml version="1.0" encoding="UTF-8"?>
84
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
85
  <title>Link example</title>
86
  <para>
87
    <link xlink:href="/test#anchor">Link text</link>
88
  </para>
89
</section>',
90
            ),
91
            array(
92
                '<?xml version="1.0" encoding="UTF-8"?>
93
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
94
  <title>Link example</title>
95
  <ezembed>
96
    <ezlink xlink:href="/test#anchor"/>
97
  </ezembed>
98
</section>',
99
                '<?xml version="1.0" encoding="UTF-8"?>
100
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ez.no/xmlns/ezpublish/docbook/xhtml" version="5.0-variant ezpublish-1.0">
101
  <title>Link example</title>
102
  <ezembed>
103
    <ezlink xlink:href="/test#anchor" href_resolved="/test#anchor"/>
104
  </ezembed>
105
</section>',
106
            ),
107
        );
108
    }
109
110
    /**
111
     * Test conversion of ezurl://<id> links.

eZ/Bundle/EzPublishCoreBundle/Tests/Routing/DefaultRouterTest.php 1 location

@@ 131-139 (lines=9) @@
128
        $this->assertSame($url, $router->generate(__METHOD__));
129
    }
130
131
    public function providerGenerateNoSiteAccess()
132
    {
133
        return array(
134
            array('/foo/bar'),
135
            array('/foo/bar/baz?truc=muche&tata=toto'),
136
            array('http://ez.no/Products/eZ-Publish-CMS'),
137
            array('http://www.metalfrance.net/decouvertes/edge-caress-inverse-ep'),
138
        );
139
    }
140
141
    /**
142
     * @dataProvider providerGenerateWithSiteAccess

eZ/Publish/API/Repository/Tests/Regression/EZP22958SearchSubtreePathstringFormatTest.php 2 locations

@@ 58-71 (lines=14) @@
55
        $result = $this->getRepository()->getSearchService()->findContent($query);
56
    }
57
58
    public function searchContentQueryProvider()
59
    {
60
        return array(
61
            array(
62
                '/1/2/',
63
            ),
64
            array(
65
                array('/1/2/', '/1/2/4/'),
66
            ),
67
            array(
68
                '/1/id0/',
69
            ),
70
        );
71
    }
72
73
    public function searchContentQueryWithInvalidDataProvider()
74
    {
@@ 73-86 (lines=14) @@
70
        );
71
    }
72
73
    public function searchContentQueryWithInvalidDataProvider()
74
    {
75
        return array(
76
            array(
77
                '/1/2',
78
            ),
79
            array(
80
                array('/1/2/', '/1/2/4'),
81
            ),
82
            array(
83
                '/1/id0',
84
            ),
85
        );
86
    }
87
}
88