mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
code styles for the wc gateway module
This commit is contained in:
parent
7fcda592f7
commit
cf0b5b0e25
33 changed files with 3453 additions and 2620 deletions
|
@ -40,7 +40,7 @@ class CheckoutPayPalAddressPresetTest extends TestCase
|
|||
|
||||
self::assertSame(
|
||||
$expected,
|
||||
$testee->filterCheckoutFiled(null, $fieldId)
|
||||
$testee->filter_checkout_field(null, $fieldId)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -266,7 +266,7 @@ class OrderProcessorTest extends TestCase
|
|||
$orderIntent
|
||||
);
|
||||
$this->assertFalse($testee->process($wcOrder, $woocommerce));
|
||||
$this->assertNotEmpty($testee->lastError());
|
||||
$this->assertNotEmpty($testee->last_error());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue