original_string: protected function removeMockFromMocksCollection($mockName, $collection)
      {
          if (!isset($this->expectedMocksCollections[$collection][$mockName])) {
              throw new \InvalidArgumentException(sprintf('The required mock "%s" doesn\'t exist in collection "%s".', $mockName, $collection));
          }
  
          $return = $this->expectedMocksCollections[$collection][$mockName];
          unset($this->expectedMocksCollections[$collection][$mockName]);
  
          return $return;
      }
code: protected function removeMockFromMocksCollection($mockName, $collection)
      {
          if (!isset($this->expectedMocksCollections[$collection][$mockName])) {
              throw new \InvalidArgumentException(sprintf('The required mock "%s" doesn\'t exist in collection "%s".', $mockName, $collection));
          }
  
          $return = $this->expectedMocksCollections[$collection][$mockName];
          unset($this->expectedMocksCollections[$collection][$mockName]);
  
          return $return;
      }
code_tokens: protected function removeMockFromMocksCollection ( $ mockName , $ collection ) { if ( ! isset ( $ this -> expectedMocksCollections [ $ collection ] [ $ mockName ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The required mock "%s" doesn\'t exist in collection "%s".' , $ mockName , $ collection ) ) ; } $ return = $ this -> expectedMocksCollections [ $ collection ] [ $ mockName ] ; unset ( $ this -> expectedMocksCollections [ $ collection ] [ $ mockName ] ) ; return $ return ; }
docstring: Removes a mock from a collection. Optionally, also from the expected values.
  
  @param string $mockName
  @param string $collection
  
  @return \PHPUnit_Framework_MockObject_MockObject
docstring_tokens: Removes a mock from a collection . Optionally also from the expected values .