/** * Returns editable order object * * @return oxorder */ public function getEditObject() { $soxId = $this->getEditObjectId(); if ($this->_oEditObject === null && isset($soxId) && $soxId != "-1") { $this->_oEditObject = oxNew("oxorder"); $this->_oEditObject->load($soxId); } return $this->_oEditObject; }
/** * Checks if order was made using PayPal payment method. * Expected result- true */ public function testIsPayPalOrder_True() { $oPayPalOrder = new oePayPalOrder_PayPal(); $soxId = '_testOrderId'; $oSession = new oxSession(); $oSession->setVariable('saved_oxid', $soxId); $oOrder = new oxorder(); $oOrder->setId($soxId); $oOrder->oxorder__oxpaymenttype = new oxField('oxidpaypal'); $oOrder->save(); $this->assertTrue($oPayPalOrder->isPayPalOrder()); }