* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE * License as published by the Free Software Foundation; either * version 3 of the License, or any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU AFFERO GENERAL PUBLIC LICENSE for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * */ $ocVersion = $_['ocVersion']; $cfgClass = $ocVersion >= 7 ? 'section' : 'personalblock'; $table_exists = OC_RoundCube_DB_Util::tableExists(); if (!$table_exists) { OCP\Util::writeLog('roundcube', 'DB table entries do not exist ...', OCP\Util::ERROR); echo $this->inc("part.error.db"); } else { $mail_userdata_entries = OC_RoundCube_App::checkLoginData(OCP\User::getUser()); ?> <form id="rc_mail_settings" action="#" method="post"> <!-- Prevent CSRF attacks--> <input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken']; ?> " id="requesttoken"> <input type="hidden" name="appname" value="roundcube"> <fieldset class="<?php echo $cfgClass;
public function testTablefound() { $class = $this->getMockClass('OCP\\Query', array('execute')); $class::staticExpects($this->any())->method('execute')->will($this->returnValue('')); $this->assertTrue(OC_RoundCube_DB_Util::tableExists(), "There should be an entry found"); }