summaryrefslogtreecommitdiffstats
path: root/tests/unit/utility
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/utility')
-rw-r--r--tests/unit/utility/ConfigTest.php12
-rw-r--r--tests/unit/utility/OPMLExporterTest.php2
2 files changed, 7 insertions, 7 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'));
diff --git a/tests/unit/utility/OPMLExporterTest.php b/tests/unit/utility/OPMLExporterTest.php
index cf20f6347..eb9384f27 100644
--- a/tests/unit/utility/OPMLExporterTest.php
+++ b/tests/unit/utility/OPMLExporterTest.php
@@ -31,7 +31,7 @@ use \OCA\News\Db\Feed;
require_once(__DIR__ . "/../../classloader.php");
-class OPMLExporterTest extends \OCA\News\Utility\TestUtility {
+class OPMLExporterTest extends \PHPUnit_Framework_TestCase {
private $exporter;
private $feed1;