update for version 1.0.2
This commit is contained in:
@@ -1110,7 +1110,7 @@ class PHPUnit_Framework_MockObject_Generator
|
||||
$methods = array();
|
||||
|
||||
foreach ($class->getMethods() as $method) {
|
||||
if ($method->isPublic() || $method->isAbstract()) {
|
||||
if (($method->isPublic() || $method->isAbstract()) && !in_array($method->getName(), $methods)) {
|
||||
$methods[] = $method->getName();
|
||||
}
|
||||
}
|
||||
|
@@ -183,4 +183,18 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* ReflectionClass::getMethods for SoapClient on PHP 5.3 produces PHP Fatal Error
|
||||
* @runInSeparateProcess
|
||||
*/
|
||||
public function testGetMockForSoapClientReflectionMethodsDuplication()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
|
||||
$this->markTestSkipped('Only for PHP < 5.4.0');
|
||||
}
|
||||
|
||||
$mock = $this->generator->getMock('SoapClient', array(), array(), '', false);
|
||||
$this->assertInstanceOf('SoapClient', $mock);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user