mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
changelog updated and stylefix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user