method_exists
reactphp/event-loop
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if the class method exists
method_exists
(
object
|
string $object_or_class
,
string $method
):
bool
protected function
createCallableMock
()
{
if (
method_exists
(
'PHPUnit\Framework\MockObject\MockBuilder'
,
'addMethods'
)) {
return
$this
->
getMockBuilder
(
'stdClass'
)->
addMethods
(array(
'__invoke'
))->
getMock
();
} else {
tests/TestCase.php