mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
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:
parent
4eed4bff3a
commit
a51886569e
1 changed files with 14 additions and 16 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue