mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-03 08:37:53 +08:00
Fix test warning
This commit is contained in:
parent
28b47e8415
commit
dcd9bfffdd
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ class CreateOrderEndpointTest extends TestCase
|
|||
{
|
||||
list($payer_factory, $testee) = $this->mockTestee();
|
||||
|
||||
$method = $this->testPrivateMethod(CreateOrderEndpoint::class, 'payer');
|
||||
$method = $this->makePrivateMethod(CreateOrderEndpoint::class, 'payer');
|
||||
$dataString = wp_json_encode($expectedResult['payer']);
|
||||
$dataObj = json_decode(wp_json_encode($expectedResult['payer']));
|
||||
|
||||
|
@ -173,11 +173,11 @@ class CreateOrderEndpointTest extends TestCase
|
|||
* @return \ReflectionMethod
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
protected function testPrivateMethod($class, $method)
|
||||
protected function makePrivateMethod($class, $method)
|
||||
{
|
||||
$reflector = new ReflectionClass($class);
|
||||
$method = $reflector->getMethod($method);
|
||||
$method->setAccessible(true);
|
||||
return $method;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue