diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 18:19:23 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 18:19:23 +0200 |
commit | 66c73a96ac2dda076bcfe0dc0a1ca2a7e169149d (patch) | |
tree | dc0318fa459e4f313217ee38e4bc63524513d721 /tests/unit/config/ConfigTest.php | |
parent | f5e64d35c05b14016eb4fffff7199386a97a9b43 (diff) |
first try to set indention limit at 80 characters in php
Diffstat (limited to 'tests/unit/config/ConfigTest.php')
-rw-r--r-- | tests/unit/config/ConfigTest.php | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/tests/unit/config/ConfigTest.php b/tests/unit/config/ConfigTest.php index 6a2b07c71..2032c2169 100644 --- a/tests/unit/config/ConfigTest.php +++ b/tests/unit/config/ConfigTest.php @@ -32,7 +32,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { 'file_exists' ]); $this->loggerParams = ['hi']; - $this->config = new Config($this->fileSystem, $this->logger, $this->loggerParams); + $this->config = new Config( + $this->fileSystem, $this->logger, $this->loggerParams + ); $this->configPath = 'config.json'; } @@ -55,7 +57,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { $this->fileSystem->expects($this->once()) ->method('file_get_contents') ->with($this->equalTo($this->configPath)) - ->will($this->returnValue("autoPurgeCount = 3\nuseCronUpdates = true")); + ->will($this->returnValue( + 'autoPurgeCount = 3' . "\n" . 'useCronUpdates = true') + ); $this->config->read($this->configPath); @@ -68,7 +72,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { $this->fileSystem->expects($this->once()) ->method('file_get_contents') ->with($this->equalTo($this->configPath)) - ->will($this->returnValue("autoPurgeMinimumInterval = 59")); + ->will($this->returnValue('autoPurgeMinimumInterval = 59')); $this->config->read($this->configPath); @@ -81,7 +85,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { $this->fileSystem->expects($this->once()) ->method('file_get_contents') ->with($this->equalTo($this->configPath)) - ->will($this->returnValue("autoPurgeCount = 3\nuseCronUpdates = false")); + ->will($this->returnValue( + 'autoPurgeCount = 3' . "\n" . 'useCronUpdates = false') + ); $this->config->read($this->configPath); @@ -120,20 +126,20 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { public function testWrite () { - $json = "autoPurgeMinimumInterval = 60\n" . - "autoPurgeCount = 3\n" . - "simplePieCacheDuration = 1800\n" . - "feedFetcherTimeout = 60\n" . - "useCronUpdates = true\n" . - "proxyHost = yo man\n" . - "proxyPort = 12\n" . - "proxyUser = this is a test\n". - "proxyPassword = se"; + $json = 'autoPurgeMinimumInterval = 60' . "\n" . + 'autoPurgeCount = 3' . "\n" . + 'simplePieCacheDuration = 1800' . "\n" . + 'feedFetcherTimeout = 60' . "\n" . + 'useCronUpdates = true' . "\n" . + 'proxyHost = yo man' . "\n" . + 'proxyPort = 12' . "\n" . + 'proxyUser = this is a test' . "\n". + 'proxyPassword = se'; $this->config->setAutoPurgeCount(3); - $this->config->setProxyHost("yo man"); + $this->config->setProxyHost('yo man'); $this->config->setProxyPort(12); - $this->config->setProxyUser("this is a test"); - $this->config->setProxyPassword("se"); + $this->config->setProxyUser('this is a test'); + $this->config->setProxyPassword('se'); $this->fileSystem->expects($this->once()) ->method('file_put_contents') @@ -157,15 +163,15 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { $this->config->setUseCronUpdates(false); - $json = "autoPurgeMinimumInterval = 60\n" . - "autoPurgeCount = 200\n" . - "simplePieCacheDuration = 1800\n" . - "feedFetcherTimeout = 60\n" . - "useCronUpdates = false\n" . - "proxyHost = \n" . - "proxyPort = 8080\n" . - "proxyUser = \n" . - "proxyPassword = "; + $json = 'autoPurgeMinimumInterval = 60' . "\n" . + 'autoPurgeCount = 200' . "\n" . + 'simplePieCacheDuration = 1800' . "\n" . + 'feedFetcherTimeout = 60' . "\n" . + 'useCronUpdates = false' . "\n" . + 'proxyHost = ' . "\n" . + 'proxyPort = 8080' . "\n" . + 'proxyUser = ' . "\n" . + 'proxyPassword = '; $this->fileSystem->expects($this->once()) ->method('file_put_contents') @@ -177,8 +183,8 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { public function testEncodesUserAndPasswordInHTTPBasicAuth() { - $this->config->setProxyUser("this is a test"); - $this->config->setProxyPassword("se"); + $this->config->setProxyUser('this is a test'); + $this->config->setProxyPassword('se'); $this->assertEquals('this is a test:se', $this->config->getProxyAuth()); } |