Example #1
0
 /**
  * Accepts and modifies the options provided to the response in the
  * constructor.
  *
  * @param array $options Options array passed by reference.
  */
 protected function handleOptions(array &$options = [])
 {
     parent::handleOptions($options);
     if (isset($options['reason_phrase'])) {
         $this->reasonPhrase = $options['reason_phrase'];
     }
 }
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testThrowsWhenMessageIsUnknown()
 {
     $m = $this->getMockBuilder('GuzzleHttp5Legacy\\Message\\AbstractMessage')->getMockForAbstractClass();
     AbstractMessage::getStartLine($m);
 }
Example #3
0
 protected function handleOptions(array &$options)
 {
     parent::handleOptions($options);
     // Use a custom emitter if one is specified, and remove it from
     // options that are exposed through getConfig()
     if (isset($options['emitter'])) {
         $this->emitter = $options['emitter'];
         unset($options['emitter']);
     }
 }