/**
  * Test case for oePayPalOxUser::createPayPalUser()
  * Creating user
  *
  * @return null
  */
 public function testCreatePayPalUser_streetName()
 {
     // streetnr in firt position
     $aPayPalData = $this->_getPayPalData();
     $aPayPalData['PAYMENTREQUEST_0_SHIPTOSTREET'] = '12 testStreetName str.';
     $oDetails = new oePayPalResponseGetExpressCheckoutDetails();
     $oDetails->setData($aPayPalData);
     oxTestModules::addModuleObject('oxAddress', new oePayPalOxAddress());
     $oPayPalUser = new oePayPalOxUser();
     $oPayPalUser->createPayPalUser($oDetails);
     $oUser = new oxUser();
     $oUser->load($oPayPalUser->getId());
     $this->assertEquals('testStreetName str.', $oUser->oxuser__oxstreet->value);
     $this->assertEquals('12', $oUser->oxuser__oxstreetnr->value);
 }
Example #2
0
 /**
  * Returns current order user object
  *
  * @return oxuser
  */
 public function getOrderUser()
 {
     if ($this->_oUser === null) {
         $this->_oUser = oxNew("oxuser");
         $this->_oUser->load($this->oxorder__oxuserid->value);
         // if object is loaded then reusing its order info
         if ($this->_isLoaded) {
             // bill address
             $this->_oUser->oxuser__oxcompany = clone $this->oxorder__oxbillcompany;
             $this->_oUser->oxuser__oxusername = clone $this->oxorder__oxbillemail;
             $this->_oUser->oxuser__oxfname = clone $this->oxorder__oxbillfname;
             $this->_oUser->oxuser__oxlname = clone $this->oxorder__oxbilllname;
             $this->_oUser->oxuser__oxstreet = clone $this->oxorder__oxbillstreet;
             $this->_oUser->oxuser__oxstreetnr = clone $this->oxorder__oxbillstreetnr;
             $this->_oUser->oxuser__oxaddinfo = clone $this->oxorder__oxbilladdinfo;
             $this->_oUser->oxuser__oxustid = clone $this->oxorder__oxbillustid;
             $this->_oUser->oxuser__oxcity = clone $this->oxorder__oxbillcity;
             $this->_oUser->oxuser__oxcountryid = clone $this->oxorder__oxbillcountryid;
             $this->_oUser->oxuser__oxstateid = clone $this->oxorder__oxbillstateid;
             $this->_oUser->oxuser__oxzip = clone $this->oxorder__oxbillzip;
             $this->_oUser->oxuser__oxfon = clone $this->oxorder__oxbillfon;
             $this->_oUser->oxuser__oxfax = clone $this->oxorder__oxbillfax;
             $this->_oUser->oxuser__oxsal = clone $this->oxorder__oxbillsal;
         }
     }
     return $this->_oUser;
 }