/
var
/
www
/
html
/
plugin-techloyce
/
tests
/
Unit
/
Upload File
HOME
<?php namespace Tests\Unit; use Tests\TestCase; class AuthorizeNetTest extends TestCase { public function testAuthentication() { $response = $this->get('/payment-gateways/authentication'); $response->assertStatus(200); } public function testAuthenticationWithInvalidApp() { $data = ['app' => 'Test']; $response = $this->get('/payment-gateways/authentication', $data); if ($response->baseResponse->original['code'] == 400){ $response->assertStatus(200); }else{ $response->assertStatus(false); } } public function testCustomersList() { $response = $this->get('/payment-gateways/customers'); $response->assertStatus(200); } public function testCustomerCreate() { $response = $this->post('/payment-gateways/customer'); $response->assertStatus(200); } public function testCustomerRetrieve() { $response = $this->get('/payment-gateways/customer/Customer_12345'); $response->assertStatus(200); } public function testCustomerUpdate() { $response = $this->post('/payment-gateways/customer/Customer_12345'); $response->assertStatus(200); } public function testCustomerDelete() { $response = $this->post('/payment-gateways/customer/delete/Customer_12345'); $response->assertStatus(200); } public function testCustomersPaymentMethodsList() { $response = $this->get('/payment-gateways/payment-methods/Customer_12345'); $response->assertStatus(200); } public function testCustomersPaymentMethodCreate() { $response = $this->post('/payment-gateways/payment-method/Customer_12345'); $response->assertStatus(200); } public function testCustomersPaymentMethodRetrieve() { $response = $this->get('/payment-gateways/payment-method/Customer_12345/PaymentMethod_12345'); $response->assertStatus(200); } public function testCustomersPaymentMethodUpdate() { $response = $this->post('/payment-gateways/payment-method/Customer_12345/PaymentMethod_12345'); $response->assertStatus(200); } public function testCustomersPaymentMethodDelete() { $response = $this->post('/payment-gateways/payment-method/delete/Customer_12345/PaymentMethod_12345'); $response->assertStatus(200); } public function testCustomersCharges() { $response = $this->get('/payment-gateways/charges/Customer_12345'); $response->assertStatus(200); } public function testCustomersChargeCreate() { $response = $this->post('/payment-gateways/charge/Customer_12345/PaymentMethod_12345'); $response->assertStatus(200); } public function testChargeRetrieve() { $response = $this->get('/payment-gateways/charge/Charge_12345'); $response->assertStatus(200); } public function testDirectCharge() { $response = $this->post('/payment-gateways/direct-charge'); $response->assertStatus(200); } public function testRefund() { $response = $this->post('/payment-gateways/refund/Customer_12345/PaymentMethod_12345/Charge_12345'); $response->assertStatus(200); } }