summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/utility/ConfigTest.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/unit/utility/ConfigTest.php b/tests/unit/utility/ConfigTest.php
index 455abf810..479acabb5 100644
--- a/tests/unit/utility/ConfigTest.php
+++ b/tests/unit/utility/ConfigTest.php
@@ -66,8 +66,21 @@ class ConfigFetcherTest extends \OCA\AppFramework\Utility\TestUtility {
$this->config->read($this->configPath);
- $this->assertEquals(3, $this->config->getAutoPurgeCount());
- $this->assertEquals(true, $this->config->getUseCronUpdates());
+ $this->assertTrue(3 === $this->config->getAutoPurgeCount());
+ $this->assertTrue(true === $this->config->getUseCronUpdates());
+ }
+
+
+ public function testReadBool () {
+ $this->fileSystem->expects($this->once())
+ ->method('file_get_contents')
+ ->with($this->equalTo($this->configPath))
+ ->will($this->returnValue("autoPurgeCount = 3\nuseCronUpdates = false"));
+
+ $this->config->read($this->configPath);
+
+ $this->assertTrue(3 === $this->config->getAutoPurgeCount());
+ $this->assertTrue(false === $this->config->getUseCronUpdates());
}