Ejemplo n.º 1
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.º 2
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'));
 }