Example #1
0
 public function testCreate()
 {
     // Create new bug comment
     $model = new BugComment();
     $model->text = 'Some comment';
     // Save model to database - should succeed
     $saved = $model->save();
     $this->assertTrue($saved);
     // Find the model we have just created
     $model = BugComment::model()->findByAttributes(array('text' => 'Some comment'));
     $this->assertTrue($model != null);
 }