diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-03-19 14:52:54 -0600 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-19 14:52:54 -0600 |
commit | d99ce3971b64e89b179ebe32885ac280d49b904f (patch) | |
tree | 980a500cb37ba267e9bd459a7ea320b472865178 /tests | |
parent | 3c66ad64e626cb602685a640c235d472f0777a53 (diff) | |
download | nextcloud-server-d99ce3971b64e89b179ebe32885ac280d49b904f.tar.gz nextcloud-server-d99ce3971b64e89b179ebe32885ac280d49b904f.zip |
Namespace and array syntax fixes
* minor fixes in preparation of a bigger DB and config PR
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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()); |