Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getDescription()
 {
     $logger = new ArrayLogger();
     $logger->notice('Retrieve existing option sets');
     $this->execute($logger);
     return $logger->getMessages();
 }
 public function testExecute()
 {
     $logger = new ArrayLogger();
     $optionsPath = realpath(__DIR__ . '/../Fixtures') . '/test_options.yml';
     $options = ['test'];
     $this->commandExecutor->expects($this->once())->method('runCommand')->with('oro:entity-extend:migration:update-config', [])->will($this->returnCallback(function ($command, $params, $logger) {
         if ($logger instanceof ArrayLogger) {
             $logger->notice('test message');
         }
         return 0;
     }));
     $migrationQuery = new UpdateExtendConfigMigrationQuery($options, $this->commandExecutor, $optionsPath);
     $migrationQuery->execute($logger);
     $this->assertEquals(['test message'], $logger->getMessages());
 }