fix test case whitespace
This commit is contained in:
parent
ad9458e85d
commit
f29dd1c784
|
@ -21,28 +21,24 @@ class Test_Config extends PHPUnit_Framework_TestCase {
|
||||||
$this->config = new OC\Config(self::CONFIG_DIR);
|
$this->config = new OC\Config(self::CONFIG_DIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testReadData()
|
public function testReadData() {
|
||||||
{
|
|
||||||
$config = new OC\Config('/non-existing');
|
$config = new OC\Config('/non-existing');
|
||||||
$this->assertAttributeEquals(array(), 'cache', $config);
|
$this->assertAttributeEquals(array(), 'cache', $config);
|
||||||
|
|
||||||
$this->assertAttributeEquals(array('foo' => 'bar'), 'cache', $this->config);
|
$this->assertAttributeEquals(array('foo' => 'bar'), 'cache', $this->config);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetKeys()
|
public function testGetKeys() {
|
||||||
{
|
|
||||||
$this->assertEquals(array('foo'), $this->config->getKeys());
|
$this->assertEquals(array('foo'), $this->config->getKeys());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetValue()
|
public function testGetValue() {
|
||||||
{
|
|
||||||
$this->assertEquals('bar', $this->config->getValue('foo'));
|
$this->assertEquals('bar', $this->config->getValue('foo'));
|
||||||
$this->assertEquals(null, $this->config->getValue('bar'));
|
$this->assertEquals(null, $this->config->getValue('bar'));
|
||||||
$this->assertEquals('moo', $this->config->getValue('bar', 'moo'));
|
$this->assertEquals('moo', $this->config->getValue('bar', 'moo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSetValue()
|
public function testSetValue() {
|
||||||
{
|
|
||||||
$this->config->setValue('foo', 'moo');
|
$this->config->setValue('foo', 'moo');
|
||||||
$this->assertAttributeEquals(array('foo' => 'moo'), 'cache', $this->config);
|
$this->assertAttributeEquals(array('foo' => 'moo'), 'cache', $this->config);
|
||||||
$content = file_get_contents(self::CONFIG_FILE);
|
$content = file_get_contents(self::CONFIG_FILE);
|
||||||
|
@ -68,8 +64,7 @@ EOL
|
||||||
, $content);
|
, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDeleteKey()
|
public function testDeleteKey() {
|
||||||
{
|
|
||||||
$this->config->deleteKey('foo');
|
$this->config->deleteKey('foo');
|
||||||
$this->assertAttributeEquals(array(), 'cache', $this->config);
|
$this->assertAttributeEquals(array(), 'cache', $this->config);
|
||||||
$content = file_get_contents(self::CONFIG_FILE);
|
$content = file_get_contents(self::CONFIG_FILE);
|
||||||
|
@ -82,8 +77,7 @@ EOL
|
||||||
, $content);
|
, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSavingDebugMode()
|
public function testSavingDebugMode() {
|
||||||
{
|
|
||||||
$this->config->setDebugMode(true);
|
$this->config->setDebugMode(true);
|
||||||
$this->config->deleteKey('foo'); // change something so we save to the config file
|
$this->config->deleteKey('foo'); // change something so we save to the config file
|
||||||
$this->assertAttributeEquals(array(), 'cache', $this->config);
|
$this->assertAttributeEquals(array(), 'cache', $this->config);
|
||||||
|
@ -102,8 +96,7 @@ EOL
|
||||||
/**
|
/**
|
||||||
* @expectedException \OC\HintException
|
* @expectedException \OC\HintException
|
||||||
*/
|
*/
|
||||||
public function testWriteData()
|
public function testWriteData() {
|
||||||
{
|
|
||||||
$config = new OC\Config('/non-writable');
|
$config = new OC\Config('/non-writable');
|
||||||
$config->setValue('foo', 'bar');
|
$config->setValue('foo', 'bar');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue