/** * @param State $state * @param OutputInterface $output */ public function write(State $state, OutputInterface $output) { foreach ($state->getModels() as $model) { $this->writeModel($model, $output); $this->mergeConfig($state, $model, $output); } }
public function testAddModel() { $state = new State($this->getConfigWriter()); $modelA = new Model(); $modelB = new Model(); $state->addModel($modelA); $state->addModel($modelB, 'B'); $this->assertEquals([0 => $modelA, 'B' => $modelB], $state->getModels()); }