| @@ 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 |
|
| @@ 945-969 (lines=25) @@ | ||
| 942 | /** |
|
| 943 | * @return array |
|
| 944 | */ |
|
| 945 | public function findByExtrefProvider() |
|
| 946 | { |
|
| 947 | return [ |
|
| 948 | 'find a linked record when searching for "tablet" ref by array field' => [ |
|
| 949 | 'nestedApps.0.$ref', |
|
| 950 | 'http://localhost/core/app/tablet', |
|
| 951 | 1 |
|
| 952 | ], |
|
| 953 | 'find a linked record when searching for "admin" ref by array field' => [ |
|
| 954 | 'nestedApps.0.$ref', |
|
| 955 | 'http://localhost/core/app/admin', |
|
| 956 | 1 |
|
| 957 | ], |
|
| 958 | 'find nothing when searching for inextistant (and unlinked) ref by array field' => [ |
|
| 959 | 'nestedApps.0.$ref', |
|
| 960 | 'http://localhost/core/app/inexistant', |
|
| 961 | 0 |
|
| 962 | ], |
|
| 963 | 'return nothing when searching with incomplete ref by array field' => [ |
|
| 964 | 'nestedApps.0.$ref', |
|
| 965 | 'http://localhost/core/app', |
|
| 966 | 0 |
|
| 967 | ], |
|
| 968 | ]; |
|
| 969 | } |
|
| 970 | } |
|
| 971 | ||