9 use PHPUnit_Framework_MockObject_MockObject as MockObject;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
12 use Symfony\Component\Console\Question\Question;
13 use Symfony\Component\Console\Question\QuestionFactory;
14 use Symfony\Component\Console\Helper\QuestionHelper;
21 private $questionFactoryMock;
26 private $questionHelperMock;
48 $this->questionFactoryMock = $this->getMockBuilder(QuestionFactory::class)
49 ->disableOriginalConstructor()
50 ->setMethods([
'create'])
52 $this->questionHelperMock = $this->getMockBuilder(QuestionHelper::class)
53 ->disableOriginalConstructor()
55 $this->inputMock = $this->getMockBuilder(InputInterface::class)
56 ->getMockForAbstractClass();
57 $this->outputMock = $this->getMockBuilder(OutputInterface::class)
58 ->getMockForAbstractClass();
61 $this->questionFactoryMock,
62 $this->questionHelperMock
74 $questionMock = $this->getMockBuilder(Question::class)
75 ->disableOriginalConstructor()
77 $this->questionHelperMock->expects($this->exactly(3))
79 ->with($this->inputMock, $this->outputMock, $questionMock)
80 ->willReturn(
'someValue');
81 $this->questionFactoryMock->expects($this->exactly(3))
84 [[
'question' => $configPaths[0] .
': ']],
85 [[
'question' => $configPaths[1] .
': ']],
86 [[
'question' => $configPaths[2] .
': ']]
88 ->willReturn($questionMock);
92 'some/config/path1' =>
'someValue',
93 'some/config/path2' =>
'someValue',
94 'some/config/path3' =>
'someValue' 96 $this->model->getValues(