/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $pluginVersion = WirecardCEE_QMore_FrontendClient::generatePluginVersion('InitiationTest', '0.0.0', 'defaultInstance', '0.0.0'); $oBackClient = new WirecardCEE_QMore_BackendClient(array('CUSTOMER_ID' => $this->_customerId, 'SHOP_ID' => $this->_shopId, 'SECRET' => $this->_secret, 'LANGUAGE' => $this->_language, 'PASSWORD' => $this->_toolkitPassword)); $this->object = $oBackClient->getOrderDetails($this->_orderNumber)->getOrder()->getPayments()->current(); }
/** * Prepares the environment before running a test. */ protected function setUp() { parent::setUp(); $customerId = $this->_customerId; $shopId = $this->_shopId; $secret = $this->_secret; $language = $this->_language; $oBackClient = new WirecardCEE_QMore_BackendClient(array('CUSTOMER_ID' => $customerId, 'SHOP_ID' => $shopId, 'SECRET' => $secret, 'LANGUAGE' => $language, 'PASSWORD' => $this->_toolkitPassword)); $this->object = $oBackClient->getOrderDetails($this->_orderNumber); }
public function testGetOrderDetails() { $oResponse = $this->object->getOrderDetails(123456); $this->assertInstanceOf('WirecardCEE_QMore_Response_Backend_GetOrderDetails', $oResponse); $this->assertEquals($oResponse->getStatus(), 0); $this->assertEmpty($oResponse->getErrors()); $this->assertFalse($oResponse->hasFailed()); $order = $oResponse->getOrder(); $this->assertInstanceOf('WirecardCEE_QMore_Response_Backend_Order', $order); }