summaryrefslogtreecommitdiffstats
path: root/tests/Unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit')
-rw-r--r--tests/Unit/Controller/PageControllerTest.php8
-rw-r--r--tests/Unit/Service/StatusServiceTest.php7
2 files changed, 9 insertions, 6 deletions
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php
index 5cfba947e..9923befb4 100644
--- a/tests/Unit/Controller/PageControllerTest.php
+++ b/tests/Unit/Controller/PageControllerTest.php
@@ -80,8 +80,8 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
->disableOriginalConstructor()
->getMock();
$this->controller = new PageController($this->appName, $this->request,
- $this->settings, $this->urlGenerator, $this->appConfig,
- $this->config, $this->l10n, $this->recommended, $this->status,
+ $this->settings, $this->urlGenerator, $this->config,
+ $this->l10n, $this->recommended, $this->status,
$this->user);
}
@@ -97,7 +97,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$response = $this->controller->index();
$this->assertEquals('index', $response->getTemplateName());
- $this->assertSame(false, $response->getParams()['cronWarning']);
+ $this->assertSame(false, $response->getParams()['warnings']['improperlyConfiguredCron']);
}
@@ -112,7 +112,7 @@ class PageControllerTest extends \PHPUnit_Framework_TestCase {
$response = $this->controller->index();
- $this->assertEquals(true, $response->getParams()['cronWarning']);
+ $this->assertEquals(true, $response->getParams()['warnings']['improperlyConfiguredCron']);
}
diff --git a/tests/Unit/Service/StatusServiceTest.php b/tests/Unit/Service/StatusServiceTest.php
index dcd331b99..095bf6247 100644
--- a/tests/Unit/Service/StatusServiceTest.php
+++ b/tests/Unit/Service/StatusServiceTest.php
@@ -33,8 +33,11 @@ class StatusServiceTest extends \PHPUnit_Framework_TestCase {
'\OCA\News\Config\Config')
->disableOriginalConstructor()
->getMock();
- $this->service = new StatusService($this->settings, $this->config,
- $this->appName);
+ $this->db = $this->getMockBuilder("\OCP\IDBConnection")
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->service = new StatusService($this->settings, $this->db,
+ $this->config, $this->appName);
}
private function beforeStatus($cronMode='cron', $cronEnabled=true,