public function testNoInteraction() { $dialog = new DialogHelper(); $input = new ArrayInput(array()); $input->setInteractive(false); $dialog->setInput($input); $this->assertEquals('not yet', $dialog->ask($this->getOutputStream(), 'Do you have a job?', 'not yet')); }
public function testSetGetInteractive() { $input = new ArrayInput(array()); $this->assertTrue($input->isInteractive(), '->isInteractive() returns whether the input should be interactive or not'); $input->setInteractive(false); $this->assertFalse($input->isInteractive(), '->setInteractive() changes the interactive flag'); }
/** * @dataProvider provideOptions */ public function testParseOptions($input, $options, $expectedOptions, $message) { $input = new ArrayInput($input, new InputDefinition($options)); $this->assertEquals($expectedOptions, $input->getOptions(), $message); }