Rename LSP function and simplify tests (#27313)

While working on a fix I found opportunities to improve readability, but
it's a big rename diff, so I'm landing separately.

Release Notes:

- N/A
9f0b09007bJoão Marcos committed on 3/22/2025, 7:23:11 PM· committed by GitHubparentf4d1e79
20 files changedLine totals unavailable