fix RegisterListenersPass test

With #12088 being merged, the test needs to be adapted to reflect the
2.5 specific changes.