public function testConfirmTransaction() { $api = new \CashWay\API(get_conf()); $sent_data = array('agent' => $api->user_agent, 'order_id' => 'ord-id', 'email' => null, 'phone' => null); $res = $api->confirmTransaction('tx-id', 'ord-id', null, null); $this->assertEquals('POST', $res['method']); $this->assertEquals('/1/transactions/tx-id/confirmation', $res['request']); $this->assertJsonStringEqualsJsonString(json_encode($sent_data), $res['body']); }