public function testGettingOutputObject() { $migrations = $this->manager->getMigrations(); $seeds = $this->manager->getSeeds(); $outputObject = $this->manager->getOutput(); $this->assertInstanceOf('\\Symfony\\Component\\Console\\Output\\OutputInterface', $outputObject); foreach ($migrations as $migration) { $this->assertEquals($outputObject, $migration->getOutput()); } foreach ($seeds as $seed) { $this->assertEquals($outputObject, $seed->getOutput()); } }
/** * Overload the basic behavior to add an instance of the InputInterface the shell call is * using in order to gives the ability to the AbstractSeed::call() method to propagate options * to the other MigrationsDispatcher it is generating. * * {@inheritdoc} */ public function getSeeds() { parent::getSeeds(); if (empty($this->seeds)) { return $this->seeds; } foreach ($this->seeds as $class => $instance) { if ($instance instanceof AbstractSeed) { $instance->setInput($this->input); } } return $this->seeds; }