/**
  * 
  * @param string $flag
  * @return Configuration
  * @throws \InvalidArgumentException
  */
 public function setFlag($flag)
 {
     if (!Flags::isValid($flag)) {
         throw new \InvalidArgumentException('Invalid flag, must be one of [' . implode(', ', VendorExtensionSeverityLevel::getValidValues()) . ']', 2);
     }
     $this->flags[$flag] = true;
     return $this;
 }
 public function testAllInvalidValuesAreInvalid()
 {
     foreach (array('foo', 'bar') as $inValidValue) {
         $this->assertFalse(Flags::isValid($inValidValue));
     }
 }