Radio list checked value

Hello, i have a form like this :
<?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?>

	<?= $form->field($model, 'myFile')->fileInput()?>
	<?= $form->field($model, 'test')->radioList($model->getStatusList())?>

	<button>Submit</button>
	<?php ActiveForm::end() ?>

I want to make a redirect who depends of ‘test’ value

public static function getStatusList()
{
return [
self::CATALOG_MOODLE => ‘Catalog Moodle’,
self::CATALOG_SECRETARIAT => ‘Catalog Secretariat’,
//other values
];
}
i have an if :

      if($this->test->value == 'Catalog Moodle')
        Yii::$app->response->redirect(Url::to(['catalogmoodle/index']));
      else
        Yii::$app->response->redirect(Url::to(['catalogsecretariat/index']));

But I always go on else

Any Ideas?

You can try this instead:

if ($this->test == self:CATALOG_MOODLE)

But, what is test->value? Doesn’t it bring a syntax error?
And you should not include this if - else logic in the model. You’d better do it in the controller.