Fix utf8mb4 on vendor tables

When creating the schema for test these tables use default length for
string: 255. Which fail when using utf8mb4.

> Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Also move the `setKeepStaticConnections` in before and after class to
avoid:

> SAVEPOINT DOCTRINE2_SAVEPOINT_2 does not exist

See https://github.com/dmaicher/doctrine-test-bundle#troubleshooting
This commit is contained in:
Jeremy Benoist
2018-11-28 20:26:18 +01:00
parent 9a8a1bdfdb
commit 877787e5fe
6 changed files with 107 additions and 24 deletions

View File

@ -18,6 +18,18 @@ use Wallabag\CoreBundle\Command\InstallCommand;
class InstallCommandTest extends WallabagCoreTestCase
{
public static function setUpBeforeClass()
{
// disable doctrine-test-bundle
StaticDriver::setKeepStaticConnections(false);
}
public static function tearDownAfterClass()
{
// enable doctrine-test-bundle
StaticDriver::setKeepStaticConnections(true);
}
public function setUp()
{
parent::setUp();
@ -51,9 +63,6 @@ class InstallCommandTest extends WallabagCoreTestCase
parent::setUp();
}
// disable doctrine-test-bundle
StaticDriver::setKeepStaticConnections(false);
$this->resetDatabase($this->getClient());
}
@ -72,8 +81,6 @@ class InstallCommandTest extends WallabagCoreTestCase
$this->resetDatabase($client);
}
// enable doctrine-test-bundle
StaticDriver::setKeepStaticConnections(true);
parent::tearDown();
}