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()); }
/** * Returns the label of workflow State. * * @return string|null * * @Serializer\VirtualProperty * @Serializer\SerializedName("workflow_label") */ public function getWorkflowStateLabel() { return null !== $this->_workflow_state ? $this->_workflow_state->getLabel() : null; }