コード例 #1
0
 public function testVersionedRecordDoesNotHaveAutoIncrement()
 {
     $tvm = new TestVersionedModel();
     $util = new DatabaseLayer\Util();
     $keys = $util->getIndexes($tvm->getDatabaseTable());
     $failed = false;
     foreach ($keys as $key) {
         if ($key->Auto_increment) {
             $failed = true;
         }
     }
     $this->assertFalse($failed, "One of the keys for a Versioned record is autoincrementing.");
 }
コード例 #2
0
ファイル: DatabaseLayer.php プロジェクト: Thruio/ActiveRecord
 public function getTableIndexes($table_name)
 {
     $util = new DatabaseLayer\Util();
     $indexes = $util->getIndexes($table_name);
     return $indexes;
 }