public function setUp() { global $TEST_SERVER_DOMAIN; $this->url = $TEST_SERVER_DOMAIN; $this->DEBUG = getenv('TEST_DEBUG') !== false ? true : false; putenv("MODE=TESTS"); $this->get($this->url . '/install/setmode.php?m=tests'); ThinkUpBasicUnitTestCase::isTestEnvironmentReady(); require THINKUP_ROOT_PATH . 'tests/config.tests.inc.php'; $this->test_database_name = $TEST_DATABASE; if (ThinkUpUnitTestCase::ramDiskTestMode()) { putenv("RD_MODE=1"); require THINKUP_WEBAPP_PATH . 'config.inc.php'; $this->test_database_name = $THINKUP_CFG['db_name']; $this->get($this->url . '/install/setmode.php?rd=1'); } }
/** * Preemptively halt test run if integration testing environment requirement isn't met. * Prevents unnecessary/inexplicable failures and data loss. */ public static function isWebTestEnvironmentReady() { ThinkUpBasicUnitTestCase::isTestEnvironmentReady(); }