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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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