Code Duplication    Length = 25-25 lines in 2 locations

src/Graviton/CoreBundle/Tests/Controller/ModuleControllerTest.php 1 location

@@ 288-312 (lines=25) @@
285
    /**
286
     * @return array
287
     */
288
    public function findByAppRefProvider()
289
    {
290
        return [
291
            'find all tablet records' => [
292
                'app.$ref',
293
                'http://localhost/core/app/tablet',
294
                5
295
            ],
296
            'find a linked record when searching for ref' => [
297
                'app.$ref',
298
                'http://localhost/core/app/admin',
299
                1
300
            ],
301
            'find nothing when searching for inextistant (and unlinked) ref' => [
302
                'app.$ref',
303
                'http://localhost/core/app/inexistant',
304
                0
305
            ],
306
            'return nothing when searching with incomplete ref' => [
307
                'app.$ref',
308
                'http://localhost/core/app',
309
                0
310
            ],
311
        ];
312
    }
313
314
    /**
315
     * Apply RQL operators to extref fields

src/Graviton/CoreBundle/Tests/Controller/ShowcaseControllerTest.php 1 location

@@ 974-998 (lines=25) @@
971
    /**
972
     * @return array
973
     */
974
    public function findByExtrefProvider()
975
    {
976
        return [
977
            'find a linked record when searching for "tablet" ref by array field' => [
978
                'nestedApps.0.$ref',
979
                'http://localhost/core/app/tablet',
980
                1
981
            ],
982
            'find a linked record when searching for "admin" ref by array field' => [
983
                'nestedApps.0.$ref',
984
                'http://localhost/core/app/admin',
985
                1
986
            ],
987
            'find nothing when searching for inextistant (and unlinked) ref by array field' => [
988
                'nestedApps.0.$ref',
989
                'http://localhost/core/app/inexistant',
990
                0
991
            ],
992
            'return nothing when searching with incomplete ref by array field' => [
993
                'nestedApps.0.$ref',
994
                'http://localhost/core/app',
995
                0
996
            ],
997
        ];
998
    }
999
}
1000