mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
changelog updated and stylefix
This commit is contained in:
parent
f971dc05eb
commit
acacef936c
@ -24,6 +24,7 @@ and this project adheres to
|
||||
* add an endpoint for checking permissions. See https://gitlab.com/Chill-Projet/chill-bundles/-/merge_requests/232
|
||||
* [activity] for a new activity: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
|
||||
* [calendar] for a new rdv: suggest and create on-the-fly locations based on the accompanying course location + location of the suggested parties
|
||||
* [period] Validation added when period is confidential and confirmed -> user cannot be null.
|
||||
|
||||
## Test releases
|
||||
|
||||
|
@ -14,10 +14,12 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class AccompanyingPeriodConfidentialTest extends KernelTestCase
|
||||
{
|
||||
|
||||
protected static $validator;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
@ -27,22 +29,9 @@ class AccompanyingPeriodConfidentialTest extends KernelTestCase
|
||||
self::$validator = self::$container->get(ValidatorInterface::class);
|
||||
}
|
||||
|
||||
public function testConfidentialValid()
|
||||
{
|
||||
$period = new AccompanyingPeriod;
|
||||
$period->setConfidential(true);
|
||||
$period->setStep('CONFIRMED');
|
||||
$period->setUser(new User());
|
||||
|
||||
|
||||
$violations = self::$validator->validate($period, []);
|
||||
|
||||
$this->assertCount(0, $violations);
|
||||
}
|
||||
|
||||
public function testConfidentialInvalid()
|
||||
{
|
||||
$period = new AccompanyingPeriod;
|
||||
$period = new AccompanyingPeriod();
|
||||
$period->setConfidential(true);
|
||||
$period->setStep('CONFIRMED');
|
||||
|
||||
@ -50,4 +39,16 @@ class AccompanyingPeriodConfidentialTest extends KernelTestCase
|
||||
|
||||
$this->assertCount(1, $violations);
|
||||
}
|
||||
|
||||
public function testConfidentialValid()
|
||||
{
|
||||
$period = new AccompanyingPeriod();
|
||||
$period->setConfidential(true);
|
||||
$period->setStep('CONFIRMED');
|
||||
$period->setUser(new User());
|
||||
|
||||
$violations = self::$validator->validate($period, []);
|
||||
|
||||
$this->assertCount(0, $violations);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user