Read as root

We needed a function that could escalate privileges to root and then be able to read a file.
Where's the unit test for this?