Fix test warning

This commit is contained in:
Alex P 2021-08-27 20:41:52 +03:00
parent 28b47e8415
commit dcd9bfffdd

View file

@ -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;
}
}
}