fix phpunit tests errors

This commit is contained in:
2023-10-04 10:06:46 +02:00
parent 15e23087ed
commit b4e5618e00
8 changed files with 15 additions and 15 deletions

View File

@@ -47,10 +47,10 @@ class CreatorJobAggregator implements AggregatorInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)

View File

@@ -47,10 +47,10 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)
@@ -70,7 +70,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface
)
)
)
->addSelect("IDENTITY({$p}_sh.scope) AS {$p}_select")
->addSelect("IDENTITY({$p}_scopeHistory.scope) AS {$p}_select")
->addGroupBy("{$p}_select");
}

View File

@@ -46,10 +46,10 @@ final readonly class UserJobAggregator implements AggregatorInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)

View File

@@ -48,10 +48,10 @@ class CreatorJobFilter implements FilterInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)

View File

@@ -48,10 +48,10 @@ class UserJobFilter implements FilterInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)

View File

@@ -48,10 +48,10 @@ class UserScopeFilter implements FilterInterface
$qb->expr()->andX(
$qb->expr()->eq("{$p}_userHistory.accompanyingPeriod", "acp.id"),
$qb->expr()->andX(
$qb->expr()->gte("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.startDate"),
$qb->expr()->gte("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.startDate"),
$qb->expr()->orX(
$qb->expr()->isNull("{$p}_userHistory.endDate"),
$qb->expr()->lt("COALESCE(acp.endDate, CURRENT_TIMESTAMP)", "{$p}_userHistory.endDate")
$qb->expr()->lt("COALESCE(acp.closingDate, CURRENT_TIMESTAMP())", "{$p}_userHistory.endDate")
)
)
)