Exemplo n.º 1
0
 /**
  * Initializes token.
  *
  * @param string            $methodName
  * @param mixed             $value Expected return value
  * @param null|StringUtil   $util
  * @param ComparatorFactory $comparatorFactory
  */
 public function __construct($methodName, $value, StringUtil $util = NULL, ComparatorFactory $comparatorFactory = NULL)
 {
     $this->name = $methodName;
     $this->value = $value;
     $this->util = $util ?: new StringUtil();
     $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
 }
Exemplo n.º 2
0
 /**
  * Initializes object prophecy.
  *
  * @param LazyDouble        $lazyDouble
  * @param CallCenter        $callCenter
  * @param RevealerInterface $revealer
  * @param ComparatorFactory $comparatorFactory
  */
 public function __construct(LazyDouble $lazyDouble, CallCenter $callCenter = NULL, RevealerInterface $revealer = NULL, ComparatorFactory $comparatorFactory = NULL)
 {
     $this->lazyDouble = $lazyDouble;
     $this->callCenter = $callCenter ?: new CallCenter();
     $this->revealer = $revealer ?: new Revealer();
     $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
 }
Exemplo n.º 3
0
 /**
  * Initializes token.
  *
  * @param mixed             $value
  * @param StringUtil        $util
  * @param ComparatorFactory $comparatorFactory
  */
 public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null)
 {
     $this->value = $value;
     $this->util = $util ?: new StringUtil();
     $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance();
 }