You are here

protected function PHPUnit_Framework_MockObject_Generator::canMockMethod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php \PHPUnit_Framework_MockObject_Generator::canMockMethod()

Parameters

ReflectionMethod $method:

Return value

bool

1 call to PHPUnit_Framework_MockObject_Generator::canMockMethod()
PHPUnit_Framework_MockObject_Generator::generateMock in vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php

File

vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php, line 986

Class

PHPUnit_Framework_MockObject_Generator
Mock Object Code Generator

Code

protected function canMockMethod(ReflectionMethod $method) {
  if ($method
    ->isConstructor() || $method
    ->isFinal() || $method
    ->isPrivate() || isset($this->blacklistedMethodNames[$method
    ->getName()])) {
    return false;
  }
  return true;
}