chore: Pass correct type for alias in QueryBuilderTest

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
This commit is contained in:
Côme Chilliet 2026-06-10 14:29:43 +02:00
parent 4eed4bff3a
commit a51886569e
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -531,8 +531,8 @@ class QueryBuilderTest extends \Test\TestCase {
public static function dataJoin(): array {
return [
[
'd1', 'data2', null, null,
['`d1`' => [['joinType' => 'inner', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => null, 'joinCondition' => null]]],
'd1', 'data2', '', null,
['`d1`' => [['joinType' => 'inner', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => '', 'joinCondition' => null]]],
'`*PREFIX*data1` `d1` INNER JOIN `*PREFIX*data2` '
],
[
@ -611,8 +611,8 @@ class QueryBuilderTest extends \Test\TestCase {
public static function dataLeftJoin(): array {
return [
[
'd1', 'data2', null, null,
['`d1`' => [['joinType' => 'left', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => null, 'joinCondition' => null]]],
'd1', 'data2', '', null,
['`d1`' => [['joinType' => 'left', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => '', 'joinCondition' => null]]],
'`*PREFIX*data1` `d1` LEFT JOIN `*PREFIX*data2` '
],
[
@ -661,8 +661,8 @@ class QueryBuilderTest extends \Test\TestCase {
public static function dataRightJoin(): array {
return [
[
'd1', 'data2', null, null,
['`d1`' => [['joinType' => 'right', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => null, 'joinCondition' => null]]],
'd1', 'data2', '', null,
['`d1`' => [['joinType' => 'right', 'joinTable' => '`*PREFIX*data2`', 'joinAlias' => '', 'joinCondition' => null]]],
'`*PREFIX*data1` `d1` RIGHT JOIN `*PREFIX*data2` '
],
[
@ -678,17 +678,15 @@ class QueryBuilderTest extends \Test\TestCase {
];
}
/**
*
* @param string $fromAlias
* @param string $tableName
* @param string $tableAlias
* @param string $condition
* @param array $expectedQueryPart
* @param string $expectedQuery
*/
#[DataProvider('dataRightJoin')]
public function testRightJoin($fromAlias, $tableName, $tableAlias, $condition, $expectedQueryPart, $expectedQuery): void {
public function testRightJoin(
string $fromAlias,
string $tableName,
string $tableAlias,
?string $condition,
array $expectedQueryPart,
string $expectedQuery,
): void {
$this->queryBuilder->from('data1', 'd1');
$this->queryBuilder->rightJoin(
$fromAlias,