public function testGetUserRoleOptions() { $options = Project::getUserRoleOptions(); $this->assertEquals(count($options), 3); $this->assertTrue(isset($options['reader'])); $this->assertTrue(isset($options['member'])); $this->assertTrue(isset($options['owner'])); }
echo $form->labelEx($model, 'username'); ?> <?php $this->widget('CAutoComplete', array('model' => $model, 'attribute' => 'username', 'data' => $usernames, 'multiple' => false, 'htmlOptions' => array('size' => 25))); ?> <?php echo $form->error($model, 'username'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'role'); ?> <?php echo $form->dropDownList($model, 'role', Project::getUserRoleOptions()); ?> <?php echo $form->error($model, 'role'); ?> </div> <div class="row buttons"> <?php echo CHtml::submitButton('Add User'); ?> </div> <?php $this->endWidget();