use PHPUnit\Framework\TestCase;
use Symfony\Component\Workflow\DefinitionBuilder;
use Symfony\Component\Workflow\Metadata\InMemoryMetadataStore;
use Symfony\Component\Workflow\Transition;
class DefinitionBuilderTest extends TestCase
{ public function testSetInitialPlaces() { $builder =
new DefinitionBuilder(['a', 'b'
]);
$builder->
setInitialPlaces('b'
);
$definition =
$builder->
build();
$this->
assertEquals(['b'
],
$definition->
getInitialPlaces());
} public function testAddTransition() { $places =
range('a', 'b'
);
$transition0 =
new Transition('name0',
$places[0
],
$places[1
]);
$transition1 =
new Transition('name1',
$places[0
],
$places[1
]);