Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 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');
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider provideOptions
  */
 public function testParseOptions($input, $options, $expectedOptions, $message)
 {
     $input = new ArrayInput($input, new InputDefinition($options));
     $this->assertEquals($expectedOptions, $input->getOptions(), $message);
 }