Code Duplication    Length = 25-25 lines in 2 locations

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

@@ 174-198 (lines=25) @@
171
    /**
172
     * @return array
173
     */
174
    public function findByAppRefProvider()
175
    {
176
        return [
177
            'find all tablet records' => [
178
                'app.$ref',
179
                'http://localhost/core/app/tablet',
180
                5
181
            ],
182
            'find a linked record when searching for ref' => [
183
                'app.$ref',
184
                'http://localhost/core/app/admin',
185
                1
186
            ],
187
            'find nothing when searching for inextistant (and unlinked) ref' => [
188
                'app.$ref',
189
                'http://localhost/core/app/inexistant',
190
                0
191
            ],
192
            'return nothing when searching with incomplete ref' => [
193
                'app.$ref',
194
                'http://localhost/core/app',
195
                0
196
            ],
197
        ];
198
    }
199
200
    /**
201
     * Apply RQL operators to extref fields

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

@@ 953-977 (lines=25) @@
950
    /**
951
     * @return array
952
     */
953
    public function findByExtrefProvider()
954
    {
955
        return [
956
            'find a linked record when searching for "tablet" ref by array field' => [
957
                'nestedApps.0.$ref',
958
                'http://localhost/core/app/tablet',
959
                1
960
            ],
961
            'find a linked record when searching for "admin" ref by array field' => [
962
                'nestedApps.0.$ref',
963
                'http://localhost/core/app/admin',
964
                1
965
            ],
966
            'find nothing when searching for inextistant (and unlinked) ref by array field' => [
967
                'nestedApps.0.$ref',
968
                'http://localhost/core/app/inexistant',
969
                0
970
            ],
971
            'return nothing when searching with incomplete ref by array field' => [
972
                'nestedApps.0.$ref',
973
                'http://localhost/core/app',
974
                0
975
            ],
976
        ];
977
    }
978
}
979