mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
action: confirm accompanying period + create workflow
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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'));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user