Created
January 9, 2018 19:40
-
-
Save desrosj/57e66b86c1c130cf53bd37e37b8e2c65 to your computer and use it in GitHub Desktop.
Class structure for WordPress unit tests where constants need to be tested
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tests_For_Stupid_Constants extends WP_UnitTestCase { | |
/** | |
* Do not preserve global state between test methods. | |
* | |
* @var bool | |
*/ | |
protected $preserveGlobalState = false; | |
/** | |
* Run each test method in a separate, isolated process. | |
* | |
* This ensures constants are properly set and tested. | |
* | |
* @var bool | |
*/ | |
protected $runTestInSeparateProcess = true; | |
function test_this_in_isolated_process() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment