mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -20,6 +20,7 @@ use Symfony\Component\Clock\MockClock;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class CollateAddressWithReferenceOrPostalCodeCronJobTest extends TestCase
|
||||
|
@@ -18,6 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class CollateAddressWithReferenceOrPostalCodeTest extends KernelTestCase
|
||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Tests\Services\AddressGeographicalUnit;
|
||||
|
||||
use Chill\MainBundle\Entity\CronJobExecution;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
@@ -20,6 +19,7 @@ use Symfony\Component\Clock\MockClock;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class RefreshAddressToGeographicalUnitMaterializedViewCronJobTest extends KernelTestCase
|
||||
@@ -32,13 +32,13 @@ final class RefreshAddressToGeographicalUnitMaterializedViewCronJobTest extends
|
||||
// 10 + 5 executions
|
||||
$job = new \Chill\MainBundle\Service\AddressGeographicalUnit\RefreshAddressToGeographicalUnitMaterializedViewCronJob(
|
||||
$this->prophesize(Connection::class)->reveal(),
|
||||
new MockClock(new DateTimeImmutable('2023-07-01T00:00:00'))
|
||||
new MockClock(new \DateTimeImmutable('2023-07-01T00:00:00'))
|
||||
);
|
||||
|
||||
$hoursAgo23 = new CronJobExecution($job->getKey());
|
||||
$hoursAgo23->setLastStart(new DateTimeImmutable('2023-06-30T01:00:00'));
|
||||
$hoursAgo23->setLastStart(new \DateTimeImmutable('2023-06-30T01:00:00'));
|
||||
$hoursAgo25 = new CronJobExecution($job->getKey());
|
||||
$hoursAgo25->setLastStart(new DateTimeImmutable('2023-06-29T23:00:00'));
|
||||
$hoursAgo25->setLastStart(new \DateTimeImmutable('2023-06-29T23:00:00'));
|
||||
|
||||
$executedForFirstTime = $executedAfter23 = $executedAfter25 = 0;
|
||||
|
||||
@@ -71,7 +71,7 @@ final class RefreshAddressToGeographicalUnitMaterializedViewCronJobTest extends
|
||||
);
|
||||
|
||||
$lastExecution = new CronJobExecution($job->getKey());
|
||||
$lastExecution->setLastStart(new DateTimeImmutable('2 days ago'));
|
||||
$lastExecution->setLastStart(new \DateTimeImmutable('2 days ago'));
|
||||
|
||||
$this->assertIsBool($job->canRun($lastExecution));
|
||||
|
||||
|
Reference in New Issue
Block a user