Some UtilTests require DB

In the current setup there is no DI so no way to mock them.
This commit is contained in:
Roeland Jago Douma 2016-07-11 21:05:39 +02:00
parent 5b6f5f1a07
commit 8d739f308b
No known key found for this signature in database
GPG key ID: 1E152838F164D13B

View file

@ -29,6 +29,9 @@ class UtilTest extends \Test\TestCase {
$this->assertTrue(is_string($edition));
}
/**
* @group DB
*/
function testFormatDate() {
date_default_timezone_set("UTC");
@ -41,6 +44,9 @@ class UtilTest extends \Test\TestCase {
$this->assertEquals($expected, $result);
}
/**
* @group DB
*/
function testFormatDateWithTZ() {
date_default_timezone_set("UTC");
@ -69,6 +75,7 @@ class UtilTest extends \Test\TestCase {
/**
* @dataProvider formatDateWithTZFromSessionData
* @group DB
*/
function testFormatDateWithTZFromSession($offset, $expected, $expectedTimeZone) {
date_default_timezone_set("UTC");
@ -285,6 +292,7 @@ class UtilTest extends \Test\TestCase {
* Test default apps
*
* @dataProvider defaultAppsProvider
* @group DB
*/
function testDefaultApps($defaultAppConfig, $expectedPath, $enabledApps) {
$oldDefaultApps = \OCP\Config::getSystemValue('defaultapp', '');