public function testGlobalDefaultsLoadedOnCreateInAbsenceOfUserDefaultPermissions() { $super = $this->logoutCurrentUserLoginNewUserAndGetByUsername('super'); UserConfigurationFormAdapter::setValue($super, null, 'defaultPermissionSetting', false); UserConfigurationFormAdapter::setDefaultPermissionGroupSetting($super, null, null); $content = $this->runControllerWithNoExceptionsAndGetContent('accounts/default/create'); // test that 'everyone' radio button is checked $this->assertEquals(preg_match('%<input id="Account_explicitReadWriteModelPermissions_type_2" value="1" ' . 'checked="checked" type="radio" name="Account\\[explicitReadWriteModelPermissions\\]\\[type\\]" />%', $content), 1); // test that no downdown item is selected $this->assertEquals(preg_match('%<option value="(\\d+)" selected="selected">(.*)</option>%', $content), 0); // Not Coding Standard }