diff options
Diffstat (limited to 'tests/lib/DB')
-rw-r--r-- | tests/lib/DB/MigratorTest.php | 10 | ||||
-rw-r--r-- | tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php | 36 | ||||
-rw-r--r-- | tests/lib/DB/QueryBuilder/QuoteHelperTest.php | 2 |
3 files changed, 24 insertions, 24 deletions
diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 6f3ebbb2b0c..6b758534897 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -138,7 +138,7 @@ class MigratorTest extends \Test\TestCase { if ($this->isSQLite()) { $this->markTestSkipped('sqlite does not throw errors when creating a new key on existing data'); } - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -157,7 +157,7 @@ class MigratorTest extends \Test\TestCase { } public function testChangeToString() { - list($startSchema, $endSchema) = $this->getChangedTypeSchema('integer', 'string'); + [$startSchema, $endSchema] = $this->getChangedTypeSchema('integer', 'string'); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); $schema = new SchemaWrapper($this->connection); @@ -184,7 +184,7 @@ class MigratorTest extends \Test\TestCase { } public function testUpgrade() { - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -202,7 +202,7 @@ class MigratorTest extends \Test\TestCase { $this->config->setSystemValue('dbtableprefix', 'ownc_'); $this->tableName = strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix') . 'test_')); - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); @@ -217,7 +217,7 @@ class MigratorTest extends \Test\TestCase { } public function testInsertAfterUpgrade() { - list($startSchema, $endSchema) = $this->getDuplicateKeySchemas(); + [$startSchema, $endSchema] = $this->getDuplicateKeySchemas(); $migrator = $this->manager->getMigrator(); $migrator->migrate($startSchema); diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php index 2a3a4e9a9c1..76d9dab75ee 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php @@ -82,8 +82,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testComparison($comparison, $input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->comparison($doctrineInput1, $comparison, $doctrineInput2), @@ -109,8 +109,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->eq($doctrineInput1, $doctrineInput2), @@ -127,8 +127,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testNotEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->neq($doctrineInput1, $doctrineInput2), @@ -145,8 +145,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testLowerThan($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->lt($doctrineInput1, $doctrineInput2), @@ -163,8 +163,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testLowerThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->lte($doctrineInput1, $doctrineInput2), @@ -181,8 +181,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testGreaterThan($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->gt($doctrineInput1, $doctrineInput2), @@ -199,8 +199,8 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isInput2Literal */ public function testGreaterThanEquals($input1, $isInput1Literal, $input2, $isInput2Literal) { - list($doctrineInput1, $ocInput1) = $this->helpWithLiteral($input1, $isInput1Literal); - list($doctrineInput2, $ocInput2) = $this->helpWithLiteral($input2, $isInput2Literal); + [$doctrineInput1, $ocInput1] = $this->helpWithLiteral($input1, $isInput1Literal); + [$doctrineInput2, $ocInput2] = $this->helpWithLiteral($input2, $isInput2Literal); $this->assertEquals( $this->doctrineExpressionBuilder->gte($doctrineInput1, $doctrineInput2), @@ -236,7 +236,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testLike($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->like('`test`', $doctrineInput), @@ -251,7 +251,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testNotLike($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->notLike('`test`', $doctrineInput), @@ -275,7 +275,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testIn($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->in('`test`', $doctrineInput), @@ -290,7 +290,7 @@ class ExpressionBuilderTest extends TestCase { * @param bool $isLiteral */ public function testNotIn($input, $isLiteral) { - list($doctrineInput, $ocInput) = $this->helpWithLiteral($input, $isLiteral); + [$doctrineInput, $ocInput] = $this->helpWithLiteral($input, $isLiteral); $this->assertEquals( $this->doctrineExpressionBuilder->notIn('`test`', $doctrineInput), diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php index 3b5562b69c9..17e7ac14a02 100644 --- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php +++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php @@ -136,7 +136,7 @@ class QuoteHelperTest extends \Test\TestCase { } if (substr_count($string, '.')) { - list($alias, $columnName) = explode('.', $string); + [$alias, $columnName] = explode('.', $string); return '`' . $alias . '`.`' . $columnName . '`'; } |