update v 1.0.7.5
This commit is contained in:
		| @@ -46,6 +46,18 @@ class MagicCallPatchSpec extends ObjectBehavior | ||||
|         $this->apply($node); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param \Prophecy\Doubler\Generator\Node\ClassNode $node | ||||
|      */ | ||||
|     function it_ignores_empty_methods_from_phpdoc($node) | ||||
|     { | ||||
|         $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiInvalidMethodDefinition'); | ||||
|  | ||||
|         $node->addMethod(new MethodNode(''))->shouldNotBeCalled(); | ||||
|  | ||||
|         $this->apply($node); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param \Prophecy\Doubler\Generator\Node\ClassNode $node | ||||
|      */ | ||||
| @@ -79,6 +91,15 @@ class MagicalApi | ||||
|     } | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * @method void invalidMethodDefinition | ||||
|  * @method void | ||||
|  * @method | ||||
|  */ | ||||
| class MagicalApiInvalidMethodDefinition | ||||
| { | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * @method void undefinedMethod() | ||||
|  * @method void definedMethod() | ||||
|   | ||||
| @@ -88,4 +88,20 @@ class SplFileInfoPatchSpec extends ObjectBehavior | ||||
|         $this->apply($node); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param \Prophecy\Doubler\Generator\Node\ClassNode  $node | ||||
|      * @param \Prophecy\Doubler\Generator\Node\MethodNode $method | ||||
|      */ | ||||
|     function it_should_supply_a_file_for_a_spl_file_object($node, $method) | ||||
|     { | ||||
|         $node->hasMethod('__construct')->willReturn(true); | ||||
|         $node->getMethod('__construct')->willReturn($method); | ||||
|         $node->getParentClass()->willReturn('SplFileObject'); | ||||
|  | ||||
|         $method->setCode(Argument::that(function($value) { | ||||
|             return strpos($value, '.php') !== false; | ||||
|         }))->shouldBeCalled(); | ||||
|  | ||||
|         $this->apply($node); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sujit Prasad
					Sujit Prasad