/**
  * @expectedException \Biplane\EnumBundle\Exception\InvalidEnumArgumentException
  */
 public function testThrowExceptionWhenInvalidFlagsRemoved()
 {
     $value = FlagsEnum::create(FlagsEnum::FIRST);
     $value->removeFlags(99);
 }
Exemplo n.º 2
0
 public function testSetDataMultipleExpanded_FlagEnum()
 {
     $data = FlagsEnum::create(1 | 4);
     $field = $this->factory->create(EnumType::class, null, array('multiple' => true, 'expanded' => true, 'enum_class' => self::FLAGS_ENUM_CLASS));
     $field->setData($data);
     $this->assertEquals($data, $field->getData());
     $this->assertEquals(array(1, 4), $field->getNormData());
     $this->assertEquals(array(0 => 1, 1 => 4), $field->getViewData());
 }