mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -15,13 +15,12 @@ use Chill\MainBundle\Entity\Notification;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Repository\UserRepository;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class NotificationTest extends KernelTestCase
|
||||
@@ -117,7 +116,7 @@ final class NotificationTest extends KernelTestCase
|
||||
->setSender($em->find(User::class, $senderId))
|
||||
->setRelatedEntityId(0)
|
||||
->setRelatedEntityClass(AccompanyingPeriod::class)
|
||||
->setUpdatedAt(new DateTimeImmutable())
|
||||
->setUpdatedAt(new \DateTimeImmutable())
|
||||
->setMessage('Fake message');
|
||||
|
||||
foreach ($addressesIds as $addresseeId) {
|
||||
@@ -132,7 +131,7 @@ final class NotificationTest extends KernelTestCase
|
||||
$this->toDelete[] = [Notification::class, $notification->getId()];
|
||||
|
||||
$this->assertEquals($senderId, $notification->getSender()->getId());
|
||||
$this->assertCount(count($addressesIds), $notification->getUnreadBy());
|
||||
$this->assertCount(\count($addressesIds), $notification->getUnreadBy());
|
||||
|
||||
$unreadIds = $notification->getUnreadBy()->map(static fn (User $u) => $u->getId());
|
||||
|
||||
|
@@ -19,6 +19,7 @@ use Prophecy\PhpUnit\ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class UserTest extends TestCase
|
||||
@@ -44,7 +45,6 @@ class UserTest extends TestCase
|
||||
->filter(fn (User\UserScopeHistory $userScopeHistory) => $userScopeHistory->getScope() === $scopeA)
|
||||
->first()->getEndDate()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function testUserJobHistory()
|
||||
@@ -67,5 +67,4 @@ class UserTest extends TestCase
|
||||
->first()->getEndDate()
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
final class EntityWorkflowTest extends TestCase
|
||||
|
Reference in New Issue
Block a user