Include `markSelected` in `getSelections` test

`markSelected` was previously stubbed but the
side effect of changing the `selections` property
changes how it runs so the actual method needs to
be included to ensure this change is correct.
Remove temporary `selections` variable

All changes to the `selections` property were cached
in a local `selections` variable to be copied over
after the each loop ends.

markSelected can be called inside the loop and
uses the `selections` property so changes to that
property need to be made in the same iteration
as it is called.