public function testSetInput() { $input = ['arguments' => [], 'options' => []]; $state = new State(); $state->setInput($input); $rc = new \ReflectionClass($state); $rp = $rc->getProperty('input'); $rp->setAccessible(true); $this->assertEquals($input, $rp->getValue($state)); }
/** * Build state * * @param \Symfony\Component\Console\Input\InputInterface $input The command input * * @return \VEBERArnaud\ETLBundle\DTO\State */ protected function buildState(InputInterface $input) { $state = new State(); $state->setInput(['arguments' => $input->getArguments(), 'options' => $input->getOptions()]); return $state; }