original_string: protected function addExpectedValue($key, $value)
      {
          if (isset($this->expectedMocks[$key]) || isset($this->expectedMocksCollections[$key]) || isset($this->expectedValues[$key])) {
              throw new \LogicException(
                  sprintf('The expected value "%s" you are trying to add is already set as mock, mock collection or value.', $key)
              );
          }
  
          if (is_object($value)) {
              throw new \InvalidArgumentException('The expected value you are trying to add is an object. Use addExpectedMock() instead.');
          }
  
          $this->expectedValues[$key] = $value;
  
          return $this;
      }
code: protected function addExpectedValue($key, $value)
      {
          if (isset($this->expectedMocks[$key]) || isset($this->expectedMocksCollections[$key]) || isset($this->expectedValues[$key])) {
              throw new \LogicException(
                  sprintf('The expected value "%s" you are trying to add is already set as mock, mock collection or value.', $key)
              );
          }
  
          if (is_object($value)) {
              throw new \InvalidArgumentException('The expected value you are trying to add is an object. Use addExpectedMock() instead.');
          }
  
          $this->expectedValues[$key] = $value;
  
          return $this;
      }
code_tokens: protected function addExpectedValue ( $ key , $ value ) { if ( isset ( $ this -> expectedMocks [ $ key ] ) || isset ( $ this -> expectedMocksCollections [ $ key ] ) || isset ( $ this -> expectedValues [ $ key ] ) ) { throw new \ LogicException ( sprintf ( 'The expected value "%s" you are trying to add is already set as mock, mock collection or value.' , $ key ) ) ; } if ( is_object ( $ value ) ) { throw new \ InvalidArgumentException ( 'The expected value you are trying to add is an object. Use addExpectedMock() instead.' ) ; } $ this -> expectedValues [ $ key ] = $ value ; return $ this ; }
docstring: Add an expected value.
  
  @param $key
  @param $value
  
  @return $this
docstring_tokens: Add an expected value .