isPropertyReadable() 공개 메소드

public isPropertyReadable ( object $object, string $property ) : boolean
$object object
$property string
리턴 boolean
예제 #1
0
파일: Caller.php 프로젝트: phpspec/phpspec
 /**
  * @param string $property
  *
  * @return bool
  */
 private function isObjectPropertyReadable($property)
 {
     $subject = $this->getWrappedObject();
     return is_object($subject) && $this->accessInspector->isPropertyReadable($subject, $property);
 }
 function it_should_detect_a_getter_if_there_is_no_magic_getter_but_wrapped_inspector_finds_one(AccessInspector $accessInspector)
 {
     $accessInspector->isPropertyReadable(new \StdClass(), 'foo')->willReturn(true);
     $this->isPropertyReadable(new \StdClass(), 'foo')->shouldReturn(true);
 }