mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-06 07:49:53 +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
|
class NewsItemApiController
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private NewsItemRepository $newsItemRepository,
|
private readonly NewsItemRepository $newsItemRepository,
|
||||||
private SerializerInterface $serializer,
|
private readonly SerializerInterface $serializer,
|
||||||
private PaginatorFactory $paginatorFactory
|
private readonly PaginatorFactory $paginatorFactory
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,7 +22,7 @@ class NewsItemRepository implements ObjectRepository
|
|||||||
{
|
{
|
||||||
private readonly EntityRepository $repository;
|
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);
|
$this->repository = $entityManager->getRepository(NewsItem::class);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
<?php
|
<?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;
|
namespace Dashboard;
|
||||||
|
|
||||||
use Chill\MainBundle\Test\PrepareClientTrait;
|
use Chill\MainBundle\Test\PrepareClientTrait;
|
||||||
@ -32,5 +41,4 @@ class NewsItemControllerTest extends WebTestCase
|
|||||||
|
|
||||||
self::assertResponseIsSuccessful();
|
self::assertResponseIsSuccessful();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,18 @@
|
|||||||
<?php
|
<?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;
|
namespace Dashboard;
|
||||||
|
|
||||||
use Chill\MainBundle\Entity\NewsItem;
|
use Chill\MainBundle\Entity\NewsItem;
|
||||||
use Chill\MainBundle\Repository\NewsItemRepository;
|
use Chill\MainBundle\Repository\NewsItemRepository;
|
||||||
use Chill\MainBundle\Test\PrepareClientTrait;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
use Symfony\Component\Clock\MockClock;
|
use Symfony\Component\Clock\MockClock;
|
||||||
|
|
||||||
@ -24,6 +32,9 @@ class NewsItemRepositoryTest extends KernelTestCase
|
|||||||
$this->newsItemRepository = self::$container->get(NewsItemRepository::class);
|
$this->newsItemRepository = self::$container->get(NewsItemRepository::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @doesNotPerformAssertions
|
||||||
|
*/
|
||||||
public function testFindWithDateFilter(): void
|
public function testFindWithDateFilter(): void
|
||||||
{
|
{
|
||||||
$clock = new MockClock('2023-11-20');
|
$clock = new MockClock('2023-11-20');
|
||||||
@ -44,7 +55,5 @@ class NewsItemRepositoryTest extends KernelTestCase
|
|||||||
$newsItemC->setContent('tralala');
|
$newsItemC->setContent('tralala');
|
||||||
$newsItemC->setStartDate(new \DateTime('2023-11-03'));
|
$newsItemC->setStartDate(new \DateTime('2023-11-03'));
|
||||||
$newsItemC->setEndDate(null);
|
$newsItemC->setEndDate(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user