Refactor phpinfo and test to use controller