changelog updated and stylefix

This commit is contained in:
2021-12-02 12:49:33 +01:00
parent f971dc05eb
commit acacef936c
2 changed files with 18 additions and 16 deletions

View File

@@ -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);
}
}