update for version 1.0.2

This commit is contained in:
sujitprasad
2015-11-30 16:38:59 +05:30
parent d0a69a8df1
commit 7e17edab1e
425 changed files with 14241 additions and 3410 deletions

View File

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

View File

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