summaryrefslogtreecommitdiffstats
path: root/tests/lib/UtilTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/UtilTest.php')
-rw-r--r--tests/lib/UtilTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 75f62163f1e..6e25ce16e75 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -38,7 +38,7 @@ class UtilTest extends \Test\TestCase {
$this->assertTrue(is_string($edition));
}
- function testSanitizeHTML() {
+ public function testSanitizeHTML() {
$badArray = [
'While it is unusual to pass an array',
'this function actually <blink>supports</blink> it.',
@@ -71,7 +71,7 @@ class UtilTest extends \Test\TestCase {
$this->assertEquals('This is a good string without HTML.', $result);
}
- function testEncodePath() {
+ public function testEncodePath() {
$component = '/§#@test%&^ä/-child';
$result = OC_Util::encodePath($component);
$this->assertEquals("/%C2%A7%23%40test%25%26%5E%C3%A4/-child", $result);
@@ -82,12 +82,12 @@ class UtilTest extends \Test\TestCase {
$this->assertEquals($expected, \OC_Util::fileInfoLoaded());
}
- function testGetDefaultEmailAddress() {
+ public function testGetDefaultEmailAddress() {
$email = \OCP\Util::getDefaultEmailAddress("no-reply");
$this->assertEquals('no-reply@localhost', $email);
}
- function testGetDefaultEmailAddressFromConfig() {
+ public function testGetDefaultEmailAddressFromConfig() {
$config = \OC::$server->getConfig();
$config->setSystemValue('mail_domain', 'example.com');
$email = \OCP\Util::getDefaultEmailAddress("no-reply");
@@ -95,7 +95,7 @@ class UtilTest extends \Test\TestCase {
$config->deleteSystemValue('mail_domain');
}
- function testGetConfiguredEmailAddressFromConfig() {
+ public function testGetConfiguredEmailAddressFromConfig() {
$config = \OC::$server->getConfig();
$config->setSystemValue('mail_domain', 'example.com');
$config->setSystemValue('mail_from_address', 'owncloud');
@@ -105,7 +105,7 @@ class UtilTest extends \Test\TestCase {
$config->deleteSystemValue('mail_from_address');
}
- function testGetInstanceIdGeneratesValidId() {
+ public function testGetInstanceIdGeneratesValidId() {
\OC::$server->getConfig()->deleteSystemValue('instanceid');
$instanceId = OC_Util::getInstanceId();
$this->assertStringStartsWith('oc', $instanceId);
@@ -178,7 +178,7 @@ class UtilTest extends \Test\TestCase {
* @param array $excludedGroups groups which should be excluded from sharing
* @param bool $expected expected result
*/
- function testIsSharingDisabledForUser($groups, $membership, $excludedGroups, $expected) {
+ public function testIsSharingDisabledForUser($groups, $membership, $excludedGroups, $expected) {
$config = $this->getMockBuilder(IConfig::class)->disableOriginalConstructor()->getMock();
$groupManager = $this->getMockBuilder('OCP\IGroupManager')->disableOriginalConstructor()->getMock();
$user = $this->getMockBuilder(IUser::class)->disableOriginalConstructor()->getMock();
@@ -224,7 +224,7 @@ class UtilTest extends \Test\TestCase {
* @dataProvider defaultAppsProvider
* @group DB
*/
- function testDefaultApps($defaultAppConfig, $expectedPath, $enabledApps) {
+ public function testDefaultApps($defaultAppConfig, $expectedPath, $enabledApps) {
$oldDefaultApps = \OC::$server->getConfig()->getSystemValue('defaultapp', '');
// CLI is doing messy stuff with the webroot, so need to work it around
$oldWebRoot = \OC::$WEBROOT;
@@ -249,7 +249,7 @@ class UtilTest extends \Test\TestCase {
\OC_User::setUserId(null);
}
- function defaultAppsProvider() {
+ public function defaultAppsProvider() {
return [
// none specified, default to files
[