mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 18:33:13 +00:00
Fix bad mock in XSendFileMappingGeneratorTest
This commit is contained in:
@@ -41,21 +41,17 @@ class XSendFileMappingGeneratorTest extends \PhraseanetTestCase
|
|||||||
$conf->expects($this->any())
|
$conf->expects($this->any())
|
||||||
->method('get')
|
->method('get')
|
||||||
->will($this->returnCallback(function ($property, $defaultValue = null) use ($originalConf) {
|
->will($this->returnCallback(function ($property, $defaultValue = null) use ($originalConf) {
|
||||||
switch ($property) {
|
return $originalConf->get($property, $defaultValue);
|
||||||
case ['main', 'database']:
|
|
||||||
return $originalConf->get($property);
|
|
||||||
default:
|
|
||||||
return $defaultValue;
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
self::$DI['cli']['conf'] = $conf;
|
self::$DI['cli']['conf'] = $conf;
|
||||||
|
|
||||||
if ($option) {
|
if ($option) {
|
||||||
self::$DI['cli']['conf']->expects($this->once())
|
$conf->expects($this->once())
|
||||||
->method('set')
|
->method('set')
|
||||||
->with('xsendfile');
|
->with('xsendfile');
|
||||||
} else {
|
} else {
|
||||||
self::$DI['cli']['conf']->expects($this->never())
|
$conf->expects($this->never())
|
||||||
->method('set');
|
->method('set');
|
||||||
}
|
}
|
||||||
$command->setContainer(self::$DI['cli']);
|
$command->setContainer(self::$DI['cli']);
|
||||||
|
|||||||
Reference in New Issue
Block a user