/** * Get a value from standard input. * * @param string $question The question you want to ask user. * * @return string The input string from standard input. * * @since 1.0 */ public function in($question = null) { $question = $question ?: $this->question; if ($question) { $this->output->out()->out($question, false); } $value = rtrim(fread($this->inputStream, 8192), "\n\r"); $this->output->out(); return $value; }
/** * Tests injecting a processor when instantiating the output object * * @return void * * @since 1.1.2 */ public function test__constructProcessorInjection() { $this->markTestSkipped('Locally this test is failing, the processor is not being passed it seems.'); $object = new Stdout(new TestProcessor()); $this->assertInstanceOf('\\Joomla\\Application\\Tests\\Cli\\Output\\Processor\\TestProcessor', $this->object->getProcessor()); }