/**
  * The one and only shell action
  *
  * Find the fixtures from command line and optionally a datasource, and import them
  *
  * @return void
  */
 public function main()
 {
     if (empty($this->args[0])) {
         $this->args[0] = $this->findAllFixtureFiles();
     }
     $CakeFixtureManager = new FixturizeFixtureManager();
     $CakeFixtureManager->loadAllFixtures($this->params['datasource'], explode(',', $this->args[0]));
 }
예제 #2
0
 /**
  * Populate test_seed database with values from records
  * if successful we will truncate the records array
  * and all inserts will happen from the seed database
  * if unuccessful, we will leave the records array
  * and all inserts will happen from the records array like normal
  * but it will still be a lot faster because of
  * TableCopyTestFixture->_tableUnmodified() checksum
  */
 public function _populateSeedDatabase()
 {
     $this->_hideLogsForSetup();
     $fixtureName = sprintf($this->options['fixtureName'], Inflector::underscore($this->name));
     $CakeFixtureManager = new FixturizeFixtureManager();
     $CakeFixtureManager->loadAllFixtures($this->sourceConfig, [$fixtureName]);
     unset($CakeFixtureManager);
     $this->_restoresForSetup();
 }