From c1943cc0fb2a5899ab91860ac034cd719df927b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 28 Oct 2015 19:09:58 +0100 Subject: [PATCH] Fix bad mock in XSendFileMappingGeneratorTest --- .../Command/Setup/XSendFileMappingGeneratorTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php b/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php index 0198876823..e6f371e1a8 100644 --- a/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Command/Setup/XSendFileMappingGeneratorTest.php @@ -41,21 +41,17 @@ class XSendFileMappingGeneratorTest extends \PhraseanetTestCase $conf->expects($this->any()) ->method('get') ->will($this->returnCallback(function ($property, $defaultValue = null) use ($originalConf) { - switch ($property) { - case ['main', 'database']: - return $originalConf->get($property); - default: - return $defaultValue; - } + return $originalConf->get($property, $defaultValue); })); + self::$DI['cli']['conf'] = $conf; if ($option) { - self::$DI['cli']['conf']->expects($this->once()) + $conf->expects($this->once()) ->method('set') ->with('xsendfile'); } else { - self::$DI['cli']['conf']->expects($this->never()) + $conf->expects($this->never()) ->method('set'); } $command->setContainer(self::$DI['cli']);