summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-09-02 17:24:45 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-09-02 17:24:45 +0200
commit9315f0c6de183eeeef620d21cab393f88b8fce5e (patch)
tree4ff30b4b3c6c42e8a984382f6a2be4166708b0c4 /tests
parentd4a2bb9d15bfeabf3473d5c3325a7aea6fb4be5b (diff)
typecast config values to default values of config object
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());
}