public function testArrayEnums()
 {
     $this->registerHandler('Biplane\\EnumBundle\\Tests\\Fixtures\\SimpleEnum');
     $data = array(SimpleEnum::create(SimpleEnum::FIRST), SimpleEnum::create(SimpleEnum::SECOND));
     $this->assertEquals($this->getContent('array_enums'), $this->serialize($data));
 }
 public function testSetDataMultipleExpanded()
 {
     $data = array(SimpleEnum::create(1));
     $field = $this->factory->create(EnumType::class, null, array('multiple' => true, 'expanded' => true, 'enum_class' => self::SIMPLE_ENUM_CLASS));
     $field->setData($data);
     $this->assertEquals($data, $field->getData());
     $this->assertEquals(array(0 => 1), $field->getViewData());
 }
 public function testEnumsForEqualsWithExtendedClasses()
 {
     $enum = SimpleEnum::create(SimpleEnum::FIRST);
     $this->assertFalse($enum->equals(ExtendedSimpleEnum::create(ExtendedSimpleEnum::FIRST)));
 }