protected function checkService() { $passed = true; $maxSpRecursionDepth = null; if (!InstallUtil::checkDatabaseMaxSpRecursionDepth('mysql', $this->form->databaseHostname, $this->form->databaseUsername, $this->form->databasePassword, $this->form->databasePort, $this->minimumRequiredMaxSpRecursionDepth, $maxSpRecursionDepth)) { if ($maxSpRecursionDepth == null) { $this->message = Zurmo::t('InstallModule', 'Could not get value of database max_sp_recursion_depth.'); } else { $this->message = Zurmo::t('InstallModule', 'Database max_sp_recursion_depth size is:') . ' '; $this->message .= $maxSpRecursionDepth . ' '; $this->message .= Zurmo::t('InstallModule', 'minimum requirement is:') . ' '; $this->message .= $this->minimumRequiredMaxSpRecursionDepth; } $passed = false; } else { $this->message = Zurmo::t('InstallModule', 'Database max_sp_recursion_depth size meets minimum requirement.'); } return $passed; }
/** * Simple test to confirm the check doesnt break. */ public function testCheckDatabaseMaxSpRecursionDepth() { $minimumRequiredMaxSpRecursionDepth = 20; $maxSpRecursionDepth = null; $this->assertNotNull(InstallUtil::checkDatabaseMaxSpRecursionDepth('mysql', $this->temporaryDatabaseHostname, $this->temporaryDatabaseUsername, $this->temporaryDatabasePassword, $this->temporaryDatabasePort, $minimumRequiredMaxSpRecursionDepth, $maxSpRecursionDepth)); }