PHP 클래스 PhpSpec\ObjectBehavior

Most specs will extend this class directly. Its responsibility is to proxy method calls to PhpSpec caller which will wrap the results into PhpSpec subjects. This results will then be able to be matched against expectations.
상속: implements ArrayAcces\ArrayAccess, implements PhpSpec\Matcher\MatchersProvider, implements PhpSpec\Wrapper\SubjectContainer, implements PhpSpec\Wrapper\ObjectWrapper, implements Specification
파일 보기 프로젝트 열기: phpspec/phpspec 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$object PhpSpec\Wrapper\Subject

공개 메소드들

메소드 설명
__call ( string $method, array $arguments = [] ) : mixed Proxies all calls to the PhpSpec subject
__get ( string $property ) : mixed Proxies getting to the PhpSpec subject
__invoke ( ) : mixed Proxies functor calls to PhpSpec subject
__set ( string $property, mixed $value ) Proxies setting to the PhpSpec subject
getMatchers ( ) : array Override this method to provide your own inline matchers
getWrappedObject ( ) : object Gets the unwrapped proxied object from PhpSpec subject
offsetExists ( string | integer $key ) : Subject Checks if a key exists in case object implements ArrayAccess
offsetGet ( string | integer $key ) : Subject Gets the value in a particular position in the ArrayAccess object
offsetSet ( string | integer $key, mixed $value ) Sets the value in a particular position in the ArrayAccess object
offsetUnset ( string | integer $key ) Unsets a position in the ArrayAccess object
setSpecificationSubject ( Subject $subject ) Used by { @link PhpSpec\Runner\Maintainer\SubjectMaintainer::prepare() } to prepare the subject with all the needed collaborators for proxying object behaviour

메소드 상세

__call() 공개 메소드

Proxies all calls to the PhpSpec subject
public __call ( string $method, array $arguments = [] ) : mixed
$method string
$arguments array
리턴 mixed

__get() 공개 메소드

Proxies getting to the PhpSpec subject
public __get ( string $property ) : mixed
$property string
리턴 mixed

__invoke() 공개 메소드

Proxies functor calls to PhpSpec subject
public __invoke ( ) : mixed
리턴 mixed

__set() 공개 메소드

Proxies setting to the PhpSpec subject
public __set ( string $property, mixed $value )
$property string
$value mixed

getMatchers() 공개 메소드

Override this method to provide your own inline matchers
public getMatchers ( ) : array
리턴 array a list of inline matchers

getWrappedObject() 공개 메소드

Gets the unwrapped proxied object from PhpSpec subject
public getWrappedObject ( ) : object
리턴 object

offsetExists() 공개 메소드

Checks if a key exists in case object implements ArrayAccess
public offsetExists ( string | integer $key ) : Subject
$key string | integer
리턴 PhpSpec\Wrapper\Subject

offsetGet() 공개 메소드

Gets the value in a particular position in the ArrayAccess object
public offsetGet ( string | integer $key ) : Subject
$key string | integer
리턴 PhpSpec\Wrapper\Subject

offsetSet() 공개 메소드

Sets the value in a particular position in the ArrayAccess object
public offsetSet ( string | integer $key, mixed $value )
$key string | integer
$value mixed

offsetUnset() 공개 메소드

Unsets a position in the ArrayAccess object
public offsetUnset ( string | integer $key )
$key string | integer

setSpecificationSubject() 공개 메소드

Used by { @link PhpSpec\Runner\Maintainer\SubjectMaintainer::prepare() } to prepare the subject with all the needed collaborators for proxying object behaviour
public setSpecificationSubject ( Subject $subject )
$subject PhpSpec\Wrapper\Subject

프로퍼티 상세

$object 보호되어 있는 프로퍼티

protected Subject,PhpSpec\Wrapper $object
리턴 PhpSpec\Wrapper\Subject