mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 15:29:50 +00:00
Fix ci issues
This commit is contained in:
parent
2af9ff7d00
commit
684f1a3015
@ -22,9 +22,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
class NewsItemApiController
|
||||
{
|
||||
public function __construct(
|
||||
private NewsItemRepository $newsItemRepository,
|
||||
private SerializerInterface $serializer,
|
||||
private PaginatorFactory $paginatorFactory
|
||||
private readonly NewsItemRepository $newsItemRepository,
|
||||
private readonly SerializerInterface $serializer,
|
||||
private readonly PaginatorFactory $paginatorFactory
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ class NewsItemRepository implements ObjectRepository
|
||||
{
|
||||
private readonly EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $entityManager, private ClockInterface $clock)
|
||||
public function __construct(EntityManagerInterface $entityManager, private readonly ClockInterface $clock)
|
||||
{
|
||||
$this->repository = $entityManager->getRepository(NewsItem::class);
|
||||
}
|
||||
|
@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Dashboard;
|
||||
|
||||
use Chill\MainBundle\Test\PrepareClientTrait;
|
||||
@ -32,5 +41,4 @@ class NewsItemControllerTest extends WebTestCase
|
||||
|
||||
self::assertResponseIsSuccessful();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Dashboard;
|
||||
|
||||
use Chill\MainBundle\Entity\NewsItem;
|
||||
use Chill\MainBundle\Repository\NewsItemRepository;
|
||||
use Chill\MainBundle\Test\PrepareClientTrait;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Clock\MockClock;
|
||||
|
||||
@ -24,6 +32,9 @@ class NewsItemRepositoryTest extends KernelTestCase
|
||||
$this->newsItemRepository = self::$container->get(NewsItemRepository::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testFindWithDateFilter(): void
|
||||
{
|
||||
$clock = new MockClock('2023-11-20');
|
||||
@ -44,7 +55,5 @@ class NewsItemRepositoryTest extends KernelTestCase
|
||||
$newsItemC->setContent('tralala');
|
||||
$newsItemC->setStartDate(new \DateTime('2023-11-03'));
|
||||
$newsItemC->setEndDate(null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user