diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/appframework/db/mappertestutility.php | 2 | ||||
-rw-r--r-- | tests/lib/db/connection.php | 3 | ||||
-rw-r--r-- | tests/lib/db/querybuilder/expressionbuildertest.php | 2 | ||||
-rw-r--r-- | tests/lib/repair/cleantags.php | 5 |
4 files changed, 7 insertions, 5 deletions
diff --git a/tests/lib/appframework/db/mappertestutility.php b/tests/lib/appframework/db/mappertestutility.php index 818e4a59b21..69f0ad4eb67 100644 --- a/tests/lib/appframework/db/mappertestutility.php +++ b/tests/lib/appframework/db/mappertestutility.php @@ -68,7 +68,7 @@ abstract class MapperTestUtility extends \Test\TestCase { /** * Returns the correct PDO constant based on the value type * @param $value - * @return PDO constant + * @return int PDO constant */ private function getPDOType($value) { switch (gettype($value)) { diff --git a/tests/lib/db/connection.php b/tests/lib/db/connection.php index dd9b31f3ed7..b10b1a322a9 100644 --- a/tests/lib/db/connection.php +++ b/tests/lib/db/connection.php @@ -11,6 +11,7 @@ namespace Test\DB; use Doctrine\DBAL\Platforms\SqlitePlatform; use OC\DB\MDB2SchemaManager; +use OCP\DB\QueryBuilder\IQueryBuilder; /** * Class Connection @@ -94,7 +95,7 @@ class Connection extends \Test\TestCase { $builder = $this->connection->getQueryBuilder(); $query = $builder->select('textfield') ->from('table') - ->where($builder->expr()->eq('integerfield', $builder->createNamedParameter($integerField, \PDO::PARAM_INT))); + ->where($builder->expr()->eq('integerfield', $builder->createNamedParameter($integerField, IQueryBuilder::PARAM_INT))); $result = $query->execute(); return $result->fetchColumn(); diff --git a/tests/lib/db/querybuilder/expressionbuildertest.php b/tests/lib/db/querybuilder/expressionbuildertest.php index f38faab9169..4122f300c86 100644 --- a/tests/lib/db/querybuilder/expressionbuildertest.php +++ b/tests/lib/db/querybuilder/expressionbuildertest.php @@ -327,7 +327,7 @@ class ExpressionBuilderTest extends TestCase { [1, null], [1, 'string'], [1, 'integer'], - [1, \PDO::PARAM_INT], + [1, IQueryBuilder::PARAM_INT], ]; } diff --git a/tests/lib/repair/cleantags.php b/tests/lib/repair/cleantags.php index 9773a591777..fa11a7f736e 100644 --- a/tests/lib/repair/cleantags.php +++ b/tests/lib/repair/cleantags.php @@ -7,6 +7,7 @@ */ namespace Test\Repair; +use OCP\DB\QueryBuilder\IQueryBuilder; /** * Tests for the cleaning the tags tables @@ -123,8 +124,8 @@ class CleanTags extends \Test\TestCase { $qb = $this->connection->getQueryBuilder(); $qb->insert('vcategory_to_object') ->values([ - 'objid' => $qb->createNamedParameter($objectId, \PDO::PARAM_INT), - 'categoryid' => $qb->createNamedParameter($category, \PDO::PARAM_INT), + 'objid' => $qb->createNamedParameter($objectId, IQueryBuilder::PARAM_INT), + 'categoryid' => $qb->createNamedParameter($category, IQueryBuilder::PARAM_INT), 'type' => $qb->createNamedParameter($type), ]) ->execute(); |