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;
    }
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;
    }
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 ; }
Removes a mock from a collection. Optionally, also from the expected values.

@param string $mockName
@param string $collection

@return \PHPUnit_Framework_MockObject_MockObject
Removes a mock from a collection . Optionally also from the expected values .