Improved test code of SearchPresentationCompilerTest

This makes it easier to produce new tests and makes
them more robust (i.e. we don't have to pass the
location manually)

Fixes #1001687
Merge pull request #30 from mads379/1001687-improve-test-code

Improved test code of SearchPresentationCompilerTest