@@ -307,6 +307,84 @@ public function testDataApiActionMetadata()
307307 'endpoint ' => 'https://data.learnosity.com/v2023.1.lts/session_scores ' ,
308308 'action ' => null , // should default to 'get'
309309 'expected ' => 'get_/session_scores '
310+ ],
311+ // Test uppercase LTS
312+ [
313+ 'endpoint ' => 'https://data.learnosity.com/v2025.3.LTS/itembank/items ' ,
314+ 'action ' => 'get ' ,
315+ 'expected ' => 'get_/itembank/items '
316+ ],
317+ // Test v2025.2.LTS
318+ [
319+ 'endpoint ' => 'https://data.learnosity.com/v2025.2.LTS/sessions ' ,
320+ 'action ' => 'get ' ,
321+ 'expected ' => 'get_/sessions '
322+ ],
323+ // Test simple v1
324+ [
325+ 'endpoint ' => 'https://data.learnosity.com/v1/items ' ,
326+ 'action ' => 'get ' ,
327+ 'expected ' => 'get_/items '
328+ ],
329+ // Test v1.85.0
330+ [
331+ 'endpoint ' => 'https://data.learnosity.com/v1.85.0/itembank/items ' ,
332+ 'action ' => 'get ' ,
333+ 'expected ' => 'get_/itembank/items '
334+ ],
335+ // Test latest
336+ [
337+ 'endpoint ' => 'https://data.learnosity.com/latest/itembank/items ' ,
338+ 'action ' => 'get ' ,
339+ 'expected ' => 'get_/itembank/items '
340+ ],
341+ // Test latest-lts
342+ [
343+ 'endpoint ' => 'https://data.learnosity.com/latest-lts/sessions ' ,
344+ 'action ' => 'get ' ,
345+ 'expected ' => 'get_/sessions '
346+ ],
347+ // Test developer
348+ [
349+ 'endpoint ' => 'https://data.learnosity.com/developer/items ' ,
350+ 'action ' => 'get ' ,
351+ 'expected ' => 'get_/items '
352+ ],
353+ // Test preview1 (alphanumeric suffix)
354+ [
355+ 'endpoint ' => 'https://data.learnosity.com/v2022.3.preview1/items ' ,
356+ 'action ' => 'get ' ,
357+ 'expected ' => 'get_/items '
358+ ],
359+ // Test preview2
360+ [
361+ 'endpoint ' => 'https://data.learnosity.com/v2022.2.preview2/sessions ' ,
362+ 'action ' => 'get ' ,
363+ 'expected ' => 'get_/sessions '
364+ ],
365+ // Test beta2
366+ [
367+ 'endpoint ' => 'https://data.learnosity.com/v1.2.3.beta2/test ' ,
368+ 'action ' => 'get ' ,
369+ 'expected ' => 'get_/test '
370+ ],
371+ // Test alpha1
372+ [
373+ 'endpoint ' => 'https://data.learnosity.com/v2024.1.alpha1/items ' ,
374+ 'action ' => 'get ' ,
375+ 'expected ' => 'get_/items '
376+ ],
377+ // Test URL with no version
378+ [
379+ 'endpoint ' => 'https://data.learnosity.com/items ' ,
380+ 'action ' => 'get ' ,
381+ 'expected ' => 'get_/items '
382+ ],
383+ // Test false positive: path starting with 'v' but not a version
384+ [
385+ 'endpoint ' => 'https://data.learnosity.com/validate/items ' ,
386+ 'action ' => 'get ' ,
387+ 'expected ' => 'get_/validate/items '
310388 ]
311389 ];
312390
0 commit comments