예제 #1
0
파일: Address.php 프로젝트: kingsj/core
 /**
  * testCreate
  *
  * @return void
  * @access public
  * @see    ____func_see____
  * @since  1.0.0
  */
 public function testCreate()
 {
     $address = new \XLite\Model\Address();
     $this->assertNull($address->getAddressId(), 'address_id checking');
     foreach ($this->addressFields as $field => $testValue) {
         $setterMethod = 'set' . \XLite\Core\Converter::getInstance()->convertToCamelCase($field);
         $getterMethod = 'get' . \XLite\Core\Converter::getInstance()->convertToCamelCase($field);
         $address->{$setterMethod}($testValue);
         $value = $address->{$getterMethod}();
         $this->assertEquals($testValue, $value, 'Creation checking (' . $field . ')');
     }
     $profile = new \XLite\Model\Profile();
     $address->setProfile($profile);
     $this->assertInstanceOf('\\XLite\\Model\\Profile', $address->getProfile(), 'Profile checking');
 }