protected function checkService() { $passed = true; $optimizerSearchDepth = null; if (!InstallUtil::checkDatabaseOptimizerSearchDepthValue('mysql', $this->form->databaseHostname, $this->form->databaseUsername, $this->form->databasePassword, $this->form->databasePort, $optimizerSearchDepth)) { if ($optimizerSearchDepth == null) { $this->message = Zurmo::t('InstallModule', 'Could not get value of database optimizer_search_depth.'); } else { $this->message = Zurmo::t('InstallModule', 'Database optimizer_search_depth value is {searchDepth}. ' . 'It is required to be set to 0.', array('{searchDepth}' => $optimizerSearchDepth)); } $passed = false; } else { $this->message = Zurmo::t('InstallModule', 'Database optimizer_search_depth size meets requirement.'); } return $passed; }
/** * Simple test to confirm the check doesnt break. */ public function testCheckDatabaseOptimizerSearchDepthValue() { $threadStackValue = null; $this->assertNotNull(InstallUtil::checkDatabaseOptimizerSearchDepthValue('mysql', $this->temporaryDatabaseHostname, $this->temporaryDatabaseUsername, $this->temporaryDatabasePassword, $this->temporaryDatabasePort, $optimizerSearchDepth)); }