@@ 91-105 (lines=15) @@ | ||
88 | parent::tearDown(); |
|
89 | } |
|
90 | ||
91 | public static function setUpBeforeClass() { |
|
92 | parent::setUpBeforeClass(); |
|
93 | $kernel = new \AppKernel('test', true); |
|
94 | $app = new Application($kernel); |
|
95 | $app->addCommands(array( |
|
96 | new CreateSchemaDoctrineODMCommand(), |
|
97 | )); |
|
98 | $kernel->boot(); |
|
99 | $command = $app->find('doctrine:mongodb:schema:create'); |
|
100 | $commandTester = new CommandTester($command); |
|
101 | $commandTester->execute(array( |
|
102 | 'command' => $command->getName(), |
|
103 | )); |
|
104 | $kernel->shutdown(); |
|
105 | } |
|
106 | ||
107 | public static function tearDownAfterClass() { |
|
108 | parent::tearDownAfterClass(); |
|
@@ 107-121 (lines=15) @@ | ||
104 | $kernel->shutdown(); |
|
105 | } |
|
106 | ||
107 | public static function tearDownAfterClass() { |
|
108 | parent::tearDownAfterClass(); |
|
109 | $kernel = new \AppKernel('test', true); |
|
110 | $app = new Application($kernel); |
|
111 | $app->addCommands(array( |
|
112 | new DropSchemaDoctrineODMCommand(), |
|
113 | )); |
|
114 | $kernel->boot(); |
|
115 | $command = $app->find('doctrine:mongodb:schema:drop'); |
|
116 | $commandTester = new CommandTester($command); |
|
117 | $commandTester->execute(array( |
|
118 | 'command' => $command->getName(), |
|
119 | )); |
|
120 | $kernel->shutdown(); |
|
121 | } |
|
122 | } |
@@ 83-98 (lines=16) @@ | ||
80 | $kernel->shutdown(); |
|
81 | } |
|
82 | ||
83 | public static function tearDownAfterClass() { |
|
84 | parent::tearDownAfterClass(); |
|
85 | $kernel = new \AppKernel('test', true); |
|
86 | $app = new Application($kernel); |
|
87 | $app->addCommands(array( |
|
88 | new DropDatabaseDoctrineCommand(), |
|
89 | )); |
|
90 | $kernel->boot(); |
|
91 | $command = $app->find('doctrine:database:drop'); |
|
92 | $commandTester = new CommandTester($command); |
|
93 | $commandTester->execute(array( |
|
94 | 'command' => $command->getName(), |
|
95 | '--force' => true, |
|
96 | )); |
|
97 | $kernel->shutdown(); |
|
98 | } |
|
99 | } |