Ejemplo n.º 1
0
 /**
  * tries to update a foreignkey which is new
  * causes expection: cannot be updated because it is new
  * @expectedException CDbException
  */
 public function testUpdateIsNew()
 {
     $foreignKey = new ForeignKey();
     $foreignKey->TABLE_SCHEMA = 'tabletest';
     $foreignKey->TABLE_NAME = 'product';
     $foreignKey->COLUMN_NAME = 'fk';
     $foreignKey->setReferences('tabletest.product_order.no');
     $foreignKey->update();
 }