getValues() 공개 메소드

public getValues ( ) : EnumValueDefinition[]
리턴 EnumValueDefinition[]
예제 #1
0
 /**
  * @it defines an enum type with deprecated value
  */
 public function testDefinesEnumTypeWithDeprecatedValue()
 {
     $enumTypeWithDeprecatedValue = new EnumType(['name' => 'EnumWithDeprecatedValue', 'values' => ['foo' => ['deprecationReason' => 'Just because']]]);
     $value = $enumTypeWithDeprecatedValue->getValues()[0];
     $this->assertEquals(['name' => 'foo', 'description' => null, 'deprecationReason' => 'Just because', 'value' => 'foo'], (array) $value);
     $this->assertEquals(true, $value->isDeprecated());
 }