PhpSpec\Wrapper\Subject\WrappedObject::beConstructedWith PHP Method

beConstructedWith() public method

public beConstructedWith ( array $args )
$args array
    public function beConstructedWith($args)
    {
        if (null === $this->classname) {
            throw new SubjectException(sprintf('You can not set object arguments. Behavior subject is %s.', $this->presenter->presentValue(null)));
        }
        if ($this->isInstantiated()) {
            throw new SubjectException('You can not change object construction method when it is already instantiated');
        }
        $this->beAnInstanceOf($this->classname, $args);
    }

Usage Example

Esempio n. 1
0
 /**
  *
  */
 public function beConstructedWith()
 {
     $this->wrappedObject->beConstructedWith(func_get_args());
 }