Last active
August 29, 2015 14:05
-
-
Save spolischook/2eebb1f9b3d4a1029388 to your computer and use it in GitHub Desktop.
Load Doctrine fixtures from Controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //.... | |
| public function indexAction() | |
| { | |
| $application = new Application($this->get('kernel')); | |
| $application->add(new CreateSchemaDoctrineCommand()); | |
| $command = $application->find('doctrine:schema:create'); | |
| $commandTester = new CommandTester($command); | |
| $commandTester->execute( | |
| array('command' => $command->getName()) | |
| ); | |
| return array(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment