diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-11-25 12:28:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-25 12:28:41 +0100 |
commit | ceff312db8354049d97c2a84889cd7f56d37fd99 (patch) | |
tree | da86b7c571676f5d3b600d4b20963be611351528 /tests/Wallabag | |
parent | f818f64145fa929c399277b665a84a87f31bbacd (diff) | |
parent | f4e7a0df0e5917c51889f95e049eda2f81a8416e (diff) | |
download | wallabag-ceff312db8354049d97c2a84889cd7f56d37fd99.tar.gz wallabag-ceff312db8354049d97c2a84889cd7f56d37fd99.tar.zst wallabag-ceff312db8354049d97c2a84889cd7f56d37fd99.zip |
Merge pull request #3401 from aaa2000/migration-initial
Add an initial doctrine migration
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Command/InstallCommandTest.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php index f684a206..bd351b18 100644 --- a/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php +++ b/tests/Wallabag/CoreBundle/Command/InstallCommandTest.php | |||
@@ -5,6 +5,7 @@ namespace Tests\Wallabag\CoreBundle\Command; | |||
5 | use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver; | 5 | use DAMA\DoctrineTestBundle\Doctrine\DBAL\StaticDriver; |
6 | use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; | 6 | use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand; |
7 | use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; | 7 | use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand; |
8 | use Doctrine\Bundle\MigrationsBundle\Command\MigrationsMigrateDoctrineCommand; | ||
8 | use Doctrine\DBAL\Platforms\PostgreSqlPlatform; | 9 | use Doctrine\DBAL\Platforms\PostgreSqlPlatform; |
9 | use Doctrine\DBAL\Platforms\SqlitePlatform; | 10 | use Doctrine\DBAL\Platforms\SqlitePlatform; |
10 | use Symfony\Bundle\FrameworkBundle\Console\Application; | 11 | use Symfony\Bundle\FrameworkBundle\Console\Application; |
@@ -98,7 +99,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
98 | $this->assertContains('Setting up database.', $tester->getDisplay()); | 99 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
99 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 100 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
100 | $this->assertContains('Config setup.', $tester->getDisplay()); | 101 | $this->assertContains('Config setup.', $tester->getDisplay()); |
101 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
102 | } | 102 | } |
103 | 103 | ||
104 | public function testRunInstallCommandWithReset() | 104 | public function testRunInstallCommandWithReset() |
@@ -125,7 +125,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
125 | $this->assertContains('Dropping database, creating database and schema, clearing the cache', $tester->getDisplay()); | 125 | $this->assertContains('Dropping database, creating database and schema, clearing the cache', $tester->getDisplay()); |
126 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 126 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
127 | $this->assertContains('Config setup.', $tester->getDisplay()); | 127 | $this->assertContains('Config setup.', $tester->getDisplay()); |
128 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
129 | 128 | ||
130 | // we force to reset everything | 129 | // we force to reset everything |
131 | $this->assertContains('Dropping database, creating database and schema, clearing the cache', $tester->getDisplay()); | 130 | $this->assertContains('Dropping database, creating database and schema, clearing the cache', $tester->getDisplay()); |
@@ -171,7 +170,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
171 | $this->assertContains('Setting up database.', $tester->getDisplay()); | 170 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
172 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 171 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
173 | $this->assertContains('Config setup.', $tester->getDisplay()); | 172 | $this->assertContains('Config setup.', $tester->getDisplay()); |
174 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
175 | 173 | ||
176 | // the current database doesn't already exist | 174 | // the current database doesn't already exist |
177 | $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); | 175 | $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); |
@@ -198,7 +196,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
198 | $this->assertContains('Setting up database.', $tester->getDisplay()); | 196 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
199 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 197 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
200 | $this->assertContains('Config setup.', $tester->getDisplay()); | 198 | $this->assertContains('Config setup.', $tester->getDisplay()); |
201 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
202 | 199 | ||
203 | $this->assertContains('Dropping schema and creating schema', $tester->getDisplay()); | 200 | $this->assertContains('Dropping schema and creating schema', $tester->getDisplay()); |
204 | } | 201 | } |
@@ -209,6 +206,7 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
209 | $application->add(new InstallCommand()); | 206 | $application->add(new InstallCommand()); |
210 | $application->add(new DropDatabaseDoctrineCommand()); | 207 | $application->add(new DropDatabaseDoctrineCommand()); |
211 | $application->add(new CreateDatabaseDoctrineCommand()); | 208 | $application->add(new CreateDatabaseDoctrineCommand()); |
209 | $application->add(new MigrationsMigrateDoctrineCommand()); | ||
212 | 210 | ||
213 | // drop database first, so the install command won't ask to reset things | 211 | // drop database first, so the install command won't ask to reset things |
214 | $command = new DropDatabaseDoctrineCommand(); | 212 | $command = new DropDatabaseDoctrineCommand(); |
@@ -242,7 +240,6 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
242 | $this->assertContains('Setting up database.', $tester->getDisplay()); | 240 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
243 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 241 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
244 | $this->assertContains('Config setup.', $tester->getDisplay()); | 242 | $this->assertContains('Config setup.', $tester->getDisplay()); |
245 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
246 | 243 | ||
247 | $this->assertContains('Creating schema', $tester->getDisplay()); | 244 | $this->assertContains('Creating schema', $tester->getDisplay()); |
248 | } | 245 | } |
@@ -265,6 +262,5 @@ class InstallCommandTest extends WallabagCoreTestCase | |||
265 | $this->assertContains('Setting up database.', $tester->getDisplay()); | 262 | $this->assertContains('Setting up database.', $tester->getDisplay()); |
266 | $this->assertContains('Administration setup.', $tester->getDisplay()); | 263 | $this->assertContains('Administration setup.', $tester->getDisplay()); |
267 | $this->assertContains('Config setup.', $tester->getDisplay()); | 264 | $this->assertContains('Config setup.', $tester->getDisplay()); |
268 | $this->assertContains('Run migrations.', $tester->getDisplay()); | ||
269 | } | 265 | } |
270 | } | 266 | } |