public function testSimpleSearch() { // Login as root $model = new LoginForm('RegularLogin'); $model->username = "******"; $model->password = "******"; $this->assertTrue($model->login()); // Test simple search without $crashGroup = new CrashGroup('search'); $crashGroup->filter = 'Unsorted'; $dataProvider = $crashGroup->search(); // Ensure nothing found $this->assertTrue(count($dataProvider->data) == 1); }
/** * Lists all models. */ public function actionIndex() { // Check that user is authorized to access this action $this->checkAuthorization(null); $model = new CrashGroup(); if (isset($_GET['q'])) { $model->filter = $_GET['q']; } if (isset($_GET['status'])) { $model->bugStatusFilter = $_GET['status']; } $dataProvider = $model->search(); $this->render('index', array('dataProvider' => $dataProvider, 'model' => $model)); }