Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 /**
  * 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));
 }