diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/docker/mysqlmb4/mb4.cnf | 3 | ||||
-rw-r--r-- | tests/lib/DB/MDB2SchemaReaderTest.php | 22 |
2 files changed, 20 insertions, 5 deletions
diff --git a/tests/docker/mysqlmb4/mb4.cnf b/tests/docker/mysqlmb4/mb4.cnf index 00333eab10d..cb09eac65e3 100644 --- a/tests/docker/mysqlmb4/mb4.cnf +++ b/tests/docker/mysqlmb4/mb4.cnf @@ -3,3 +3,6 @@ innodb_large_prefix=true innodb_file_format=barracuda innodb_file_per_table=true + +innodb_buffer_pool_size = 512M +innodb_flush_log_at_trx_commit = 2 diff --git a/tests/lib/DB/MDB2SchemaReaderTest.php b/tests/lib/DB/MDB2SchemaReaderTest.php index c740eb97f4b..dcec6ae593e 100644 --- a/tests/lib/DB/MDB2SchemaReaderTest.php +++ b/tests/lib/DB/MDB2SchemaReaderTest.php @@ -10,18 +10,30 @@ namespace Test\DB; use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Schema\Schema; +use OC\DB\MDB2SchemaReader; +use OCP\IConfig; +use Test\TestCase; -class MDB2SchemaReaderTest extends \Test\TestCase { +/** + * Class MDB2SchemaReaderTest + * + * @group DB + * + * @package Test\DB + */ +class MDB2SchemaReaderTest extends TestCase { /** - * @var \OC\DB\MDB2SchemaReader $reader + * @var MDB2SchemaReader $reader */ protected $reader; /** - * @return \OC\Config + * @return IConfig */ protected function getConfig() { - $config = $this->getMockBuilder('\OCP\IConfig') + /** @var IConfig | \PHPUnit_Framework_MockObject_MockObject $config */ + $config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); $config->expects($this->any()) @@ -34,7 +46,7 @@ class MDB2SchemaReaderTest extends \Test\TestCase { } public function testRead() { - $reader = new \OC\DB\MDB2SchemaReader($this->getConfig(), new MySqlPlatform()); + $reader = new MDB2SchemaReader($this->getConfig(), new MySqlPlatform()); $schema = $reader->loadSchemaFromFile(__DIR__ . '/testschema.xml'); $this->assertCount(1, $schema->getTables()); |