}
function testSetGetKeyValue() {
- $this->configCache
+ $this->configMock
->shouldReceive('set')
->with('config', 'test', 'now')
->andReturn(true)
->once();
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('config', 'test', NULL)
+ ->with('config', 'test')
->andReturn('now')
->twice();
$txt = $this->dumpExecute($console);
$this->assertEquals("config.test <= now\n", $txt);
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('config', 'test', null)
+ ->with('config', 'test')
->andReturn('now')
->once();
$txt = $this->dumpExecute($console);
$this->assertEquals("config.test => now\n", $txt);
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('config', 'test', null)
+ ->with('config', 'test')
->andReturn(null)
->once();
function testSetArrayValue() {
$testArray = [1, 2, 3];
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('config', 'test', null)
+ ->with('config', 'test')
->andReturn($testArray)
->once();
}
function testVerbose() {
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('test', 'it', null)
+ ->with('test', 'it')
->andReturn('now')
->once();
$console = new Config($this->consoleArgv);
}
function testUnableToSet() {
- $this->configCache
+ $this->configMock
->shouldReceive('set')
->with('test', 'it', 'now')
->andReturn(false)
->once();
- $this->configCache
+ $this->configMock
->shouldReceive('get')
- ->with('test', 'it', NULL)
+ ->with('test', 'it')
->andReturn(NULL)
->once();
$console = new Config();