PhpSpec\CodeAnalysis\AccessInspector::isPropertyWritable PHP Method

isPropertyWritable() public method

public isPropertyWritable ( object $object, string $property ) : boolean
$object object
$property string
return boolean
    public function isPropertyWritable($object, $property);

Usage Example

示例#1
0
 function it_sets_a_property_on_the_wrapped_object(WrappedObject $wrappedObject, AccessInspector $accessInspector)
 {
     $obj = new \stdClass();
     $obj->id = 1;
     $accessInspector->isPropertyWritable(Argument::type('stdClass'), 'id')->willReturn('true');
     $wrappedObject->isInstantiated()->willReturn(true);
     $wrappedObject->getInstance()->willReturn($obj);
     $this->set('id', 2)->shouldReturn(2);
 }
All Usage Examples Of PhpSpec\CodeAnalysis\AccessInspector::isPropertyWritable