mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
47 lines
1.1 KiB
PHP
47 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
|
|
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 Chill\PersonBundle\Tests\Workflows;
|
|
|
|
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|
use DateTime;
|
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
|
use Symfony\Component\Workflow\Registry;
|
|
|
|
/**
|
|
* @internal
|
|
* @coversNothing
|
|
*/
|
|
final 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'));
|
|
}
|
|
}
|