Add defined check for constants

When running tests in a separate process with @runInSeparateProcess, multiple constant definitions throw several PHP notices.
Merge branch 'master' of github.com:10up/wp_mock