/**
  * Tests that the two set methods leave a consistent state.
  */
 public function testConsistency()
 {
     $this->groupService->setOptionsFor('ADMIN', $this->optionData['admin']);
     $this->groupService->setOptionsFor('USER', $this->optionData['user']);
     // check single get method
     $option = $this->groupService->get('ADMIN', 'acp', 'twomartens.core', 'access');
     $this->assertTrue($option->getValue());
     // change via single change
     $newOption = new Option(0, 'access', 'boolean', false);
     $this->groupService->set('ADMIN', 'acp', 'twomartens.core', $newOption);
     // check complete get
     $options = $this->groupService->getOptionsFor('ADMIN');
     $categories = $options->getCategories();
     foreach ($categories as $category) {
         if ($category->getName() != 'acp') {
             continue;
         }
         $_options = $category->getOptions();
         foreach ($_options as $option) {
             if ($option->getName() != 'access') {
                 continue;
             }
             $this->assertFalse($option->getValue());
             break 2;
         }
     }
 }