public function testSetAllClearAllHasNone()
 {
     $configuration = new Configuration();
     foreach (Flags::getValidValues() as $flag) {
         $configuration->setFlag($flag);
         $configuration->clearFlag($flag);
         $this->assertFalse($configuration->hasFlag($flag));
     }
 }
 public function testSetValidValueThrowsNoException()
 {
     $configuration = new Configuration();
     try {
         foreach (Flags::getValidValues() as $validValue) {
             $configuration->setFlag($validValue);
         }
     } catch (\InvalidArgumentException $invalidArgumentException) {
         $this->fail('Unexpected InvalidArgumentException for $configuration->setFlag(\'' . $validValue . '\')');
     }
 }
 /**
  * 
  * @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));
     }
 }