summaryrefslogtreecommitdiffstats
path: root/tests/unit/utility/ConfigTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/utility/ConfigTest.php')
-rw-r--r--tests/unit/utility/ConfigTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/utility/ConfigTest.php b/tests/unit/utility/ConfigTest.php
index a2b871c76..8dd64ac7b 100644
--- a/tests/unit/utility/ConfigTest.php
+++ b/tests/unit/utility/ConfigTest.php
@@ -28,15 +28,15 @@ namespace OCA\News\Utility;
require_once(__DIR__ . "/../../classloader.php");
-class ConfigFetcherTest extends \OCA\News\Utility\TestUtility {
+class ConfigFetcherTest extends \PHPUnit_Framework_TestCase {
private $fileSystem;
private $config;
private $configPath;
public function setUp() {
- $this->api = $this->getMockBuilder(
- '\OCA\News\Core\API')
+ $this->logger = $this->getMockBuilder(
+ '\OCA\News\Core\Logger')
->disableOriginalConstructor()
->getMock();
$this->fileSystem = $this->getMock('FileSystem', array(
@@ -44,7 +44,7 @@ class ConfigFetcherTest extends \OCA\News\Utility\TestUtility {
'file_put_contents',
'file_exists'
));
- $this->config = new Config($this->fileSystem, $this->api);
+ $this->config = new Config($this->fileSystem, $this->logger);
$this->configPath = 'config.json';
}
@@ -94,7 +94,7 @@ class ConfigFetcherTest extends \OCA\News\Utility\TestUtility {
->method('file_get_contents')
->with($this->equalTo($this->configPath))
->will($this->returnValue('autoPurgeCounts = 3'));
- $this->api->expects($this->once())
+ $this->logger->expects($this->once())
->method('log')
->with($this->equalTo('Configuration value "autoPurgeCounts" ' .
'does not exist. Ignored value.'),
@@ -109,7 +109,7 @@ class ConfigFetcherTest extends \OCA\News\Utility\TestUtility {
->method('file_get_contents')
->with($this->equalTo($this->configPath))
->will($this->returnValue(''));
- $this->api->expects($this->once())
+ $this->logger->expects($this->once())
->method('log')
->with($this->equalTo('Configuration invalid. Ignoring values.'),
$this->equalTo('warn'));