code styles for the wc gateway module

This commit is contained in:
David Remer 2020-08-28 08:13:45 +03:00
parent 7fcda592f7
commit cf0b5b0e25
33 changed files with 3453 additions and 2620 deletions

View file

@ -40,7 +40,7 @@ class CheckoutPayPalAddressPresetTest extends TestCase
self::assertSame(
$expected,
$testee->filterCheckoutFiled(null, $fieldId)
$testee->filter_checkout_field(null, $fieldId)
);
}

View file

@ -174,7 +174,7 @@ class WcGatewayTest extends TestCase
$sessionHandler
);
$this->assertTrue($testee->captureAuthorizedPayment($wcOrder));
$this->assertTrue($testee->capture_authorized_payment($wcOrder));
}
public function testCaptureAuthorizedPaymentHasAlreadyBeenCaptured() {
@ -220,7 +220,7 @@ class WcGatewayTest extends TestCase
$sessionHandler
);
$this->assertTrue($testee->captureAuthorizedPayment($wcOrder));
$this->assertTrue($testee->capture_authorized_payment($wcOrder));
}
/**
@ -259,7 +259,7 @@ class WcGatewayTest extends TestCase
$sessionHandler
);
$this->assertFalse($testee->captureAuthorizedPayment($wcOrder));
$this->assertFalse($testee->capture_authorized_payment($wcOrder));
}
public function dataForTestCaptureAuthorizedPaymentNoActionableFailures() : array

View file

@ -63,7 +63,7 @@ class AuthorizedPaymentsProcessorTest extends TestCase
->with(PayPalGateway::ORDER_ID_META_KEY)
->andReturn($orderId);
$this->assertTrue($testee->process($wcOrder));
$this->assertEquals(AuthorizedPaymentsProcessor::SUCCESSFUL, $testee->lastStatus());
$this->assertEquals(AuthorizedPaymentsProcessor::SUCCESSFUL, $testee->last_status());
}
public function testInaccessible() {
@ -82,7 +82,7 @@ class AuthorizedPaymentsProcessorTest extends TestCase
->with(PayPalGateway::ORDER_ID_META_KEY)
->andReturn($orderId);
$this->assertFalse($testee->process($wcOrder));
$this->assertEquals(AuthorizedPaymentsProcessor::INACCESSIBLE, $testee->lastStatus());
$this->assertEquals(AuthorizedPaymentsProcessor::INACCESSIBLE, $testee->last_status());
}
public function testNotFound() {
@ -101,7 +101,7 @@ class AuthorizedPaymentsProcessorTest extends TestCase
->with(PayPalGateway::ORDER_ID_META_KEY)
->andReturn($orderId);
$this->assertFalse($testee->process($wcOrder));
$this->assertEquals(AuthorizedPaymentsProcessor::NOT_FOUND, $testee->lastStatus());
$this->assertEquals(AuthorizedPaymentsProcessor::NOT_FOUND, $testee->last_status());
}
public function testCaptureFails() {
@ -149,7 +149,7 @@ class AuthorizedPaymentsProcessorTest extends TestCase
->with(PayPalGateway::ORDER_ID_META_KEY)
->andReturn($orderId);
$this->assertFalse($testee->process($wcOrder));
$this->assertEquals(AuthorizedPaymentsProcessor::FAILED, $testee->lastStatus());
$this->assertEquals(AuthorizedPaymentsProcessor::FAILED, $testee->last_status());
}
public function testAllAreCaptured() {
@ -197,6 +197,6 @@ class AuthorizedPaymentsProcessorTest extends TestCase
->with(PayPalGateway::ORDER_ID_META_KEY)
->andReturn($orderId);
$this->assertFalse($testee->process($wcOrder));
$this->assertEquals(AuthorizedPaymentsProcessor::ALREADY_CAPTURED, $testee->lastStatus());
$this->assertEquals(AuthorizedPaymentsProcessor::ALREADY_CAPTURED, $testee->last_status());
}
}

View file

@ -266,7 +266,7 @@ class OrderProcessorTest extends TestCase
$orderIntent
);
$this->assertFalse($testee->process($wcOrder, $woocommerce));
$this->assertNotEmpty($testee->lastError());
$this->assertNotEmpty($testee->last_error());
}