- // We mock the QuestionHelper
- $question = $this->getMockBuilder('Symfony\Component\Console\Helper\QuestionHelper')
- ->disableOriginalConstructor()
- ->getMock();
-
- $question->expects($this->exactly(3))
- ->method('ask')
- ->will($this->onConsecutiveCalls(
- false, // don't want to reset the entire database
- true, // do want to reset the schema
- false // don't want to create a new user
- ));
-
- // We override the standard helper with our mock
- $command->getHelperSet()->set($question, 'question');
-