function Test_of_getModelName() { $AkTestUser = new AkTestUser(); $this->assertEqual($AkTestUser->getModelName(), 'AkTestUser'); $AkTestField = new AkTestField(); $this->assertEqual($AkTestField->getModelName(), 'AkTestField'); }
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'); } }