Exemple #1
0
 function Test_of_getModelName()
 {
     $AkTestUser = new AkTestUser();
     $this->assertEqual($AkTestUser->getModelName(), 'AkTestUser');
     $AkTestField = new AkTestField();
     $this->assertEqual($AkTestField->getModelName(), 'AkTestField');
 }
Exemple #2
0
 function Test_of_set_and_getModelName()
 {
     $AkTestUser = new AkTestUser();
     $this->assertEqual($AkTestUser->getModelName(), 'AkTestUser');
     $AkTestField = new AkTestField();
     $this->assertEqual($AkTestField->getModelName(), 'AkTestField');
     if (AK_PHP5) {
         $AkInvalidModel = new AkActiveRecord();
         $this->assertEqual($AkInvalidModel->getModelName(), 'AkActiveRecord');
     } else {
         $AkInvalidModel = new AkActiveRecord();
         $AkInvalidModel->setModelName('CustomModelName');
         $this->assertEqual($AkInvalidModel->getModelName(), 'CustomModelName');
     }
 }