mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-19 08:44:24 +00:00
28 lines
708 B
PHP
28 lines
708 B
PHP
<?php
|
|
|
|
namespace Chill\PersonBundle\Tests\Workflows;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
use Symfony\Component\Workflow\Registry;
|
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|
|
|
class AccompanyingPeriodLifecycle extends KernelTestCase
|
|
{
|
|
|
|
protected function setUp()
|
|
{
|
|
self::bootKernel();
|
|
}
|
|
|
|
public function testConfirm()
|
|
{
|
|
$registry = self::$container->get(Registry::class);
|
|
$period = new AccompanyingPeriod(new \DateTime('now'));
|
|
$workflow = $registry->get($period);
|
|
|
|
$this->assertArrayHasKey('DRAFT', $workflow->getMarking($period)->getPlaces());
|
|
$this->assertTrue($workflow->can($period, 'confirm'));
|
|
}
|
|
|
|
}
|