Exemplo n.º 1
0
 /**
  * @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);
     }
 }
Exemplo n.º 2
0
 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());
 }