/** * @return \yii\db\ActiveQuery */ public function getTest() { return $this->hasOne(Test::className(), ['id' => 'test_id']); }