Code Duplication    Length = 15-15 lines in 3 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 1 location

@@ 235-249 (lines=15) @@
232
233
    protected $contentTypeHandler;
234
235
    protected function getContentTypeHandler()
236
    {
237
        if (!isset($this->contentTypeHandler)) {
238
            $this->contentTypeHandler = new ContentTypeHandler(
239
                new ContentTypeGateway(
240
                    $this->getDatabaseHandler(),
241
                    $this->getLanguageMaskGenerator()
242
                ),
243
                new ContentTypeMapper($this->getConverterRegistry()),
244
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
245
            );
246
        }
247
248
        return $this->contentTypeHandler;
249
    }
250
251
    protected function getConverterRegistry()
252
    {

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationSortTest.php 1 location

@@ 140-154 (lines=15) @@
137
138
    protected $contentTypeHandler;
139
140
    protected function getContentTypeHandler()
141
    {
142
        if (!isset($this->contentTypeHandler)) {
143
            $this->contentTypeHandler = new ContentTypeHandler(
144
                new ContentTypeGateway(
145
                    $this->getDatabaseHandler(),
146
                    $this->getLanguageMaskGenerator()
147
                ),
148
                new ContentTypeMapper($this->getConverterRegistry()),
149
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
150
            );
151
        }
152
153
        return $this->contentTypeHandler;
154
    }
155
156
    protected $fieldRegistry;
157

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 1 location

@@ 208-222 (lines=15) @@
205
206
    protected $contentTypeHandler;
207
208
    protected function getContentTypeHandler()
209
    {
210
        if (!isset($this->contentTypeHandler)) {
211
            $this->contentTypeHandler = new ContentTypeHandler(
212
                new ContentTypeGateway(
213
                    $this->getDatabaseHandler(),
214
                    $this->getLanguageMaskGenerator()
215
                ),
216
                new ContentTypeMapper($this->getConverterRegistry()),
217
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
218
            );
219
        }
220
221
        return $this->contentTypeHandler;
222
    }
223
224
    protected $fieldRegistry;
225