Ejemplo n.º 1
0
 public function testConstruct()
 {
     $state = new State();
     $this->assertNotNull($state->getUid());
     $this->assertNull($state->getCode());
     $this->assertNull($state->getLabel());
     $state = new State('test_state', ['code' => 123, 'label' => 'random label']);
     $this->assertSame('test_state', $state->getUid());
     $this->assertSame(123, $state->getCode());
     $this->assertSame('random label', $state->getLabel());
 }
Ejemplo n.º 2
0
 /**
  * Returns the uid of workflow State.
  *
  * @return string|null
  *
  * @Serializer\VirtualProperty
  * @Serializer\SerializedName("workflow_uid")
  */
 public function getWorkflowStateUid()
 {
     return null !== $this->_workflow_state ? $this->_workflow_state->getUid() : null;
 }