original_string: public static function mock($namespace, $name)
      {
          $delegateBuilder = new MockDelegateFunctionBuilder();
          $delegateBuilder->build($name);
          
          $mockeryMock = Mockery::mock($delegateBuilder->getFullyQualifiedClassName());
          $mockeryMock->makePartial()->shouldReceive(MockDelegateFunctionBuilder::METHOD);
  
          $builder = new MockBuilder();
          $builder->setNamespace($namespace)
                  ->setName($name)
                  ->setFunctionProvider($mockeryMock);
          $mock = $builder->build();
          $mock->enable();
          
          $disabler = new MockDisabler($mock);
          Mockery::getContainer()->rememberMock($disabler);
          
          return new ExpectationProxy($mockeryMock);
      }
code: public static function mock($namespace, $name)
      {
          $delegateBuilder = new MockDelegateFunctionBuilder();
          $delegateBuilder->build($name);
          
          $mockeryMock = Mockery::mock($delegateBuilder->getFullyQualifiedClassName());
          $mockeryMock->makePartial()->shouldReceive(MockDelegateFunctionBuilder::METHOD);
  
          $builder = new MockBuilder();
          $builder->setNamespace($namespace)
                  ->setName($name)
                  ->setFunctionProvider($mockeryMock);
          $mock = $builder->build();
          $mock->enable();
          
          $disabler = new MockDisabler($mock);
          Mockery::getContainer()->rememberMock($disabler);
          
          return new ExpectationProxy($mockeryMock);
      }
code_tokens: public static function mock ( $ namespace , $ name ) { $ delegateBuilder = new MockDelegateFunctionBuilder ( ) ; $ delegateBuilder -> build ( $ name ) ; $ mockeryMock = Mockery :: mock ( $ delegateBuilder -> getFullyQualifiedClassName ( ) ) ; $ mockeryMock -> makePartial ( ) -> shouldReceive ( MockDelegateFunctionBuilder :: METHOD ) ; $ builder = new MockBuilder ( ) ; $ builder -> setNamespace ( $ namespace ) -> setName ( $ name ) -> setFunctionProvider ( $ mockeryMock ) ; $ mock = $ builder -> build ( ) ; $ mock -> enable ( ) ; $ disabler = new MockDisabler ( $ mock ) ; Mockery :: getContainer ( ) -> rememberMock ( $ disabler ) ; return new ExpectationProxy ( $ mockeryMock ) ; }
docstring: Builds a function mock.
  
  Disable this mock after the test with Mockery::close().
  
  @param string $namespace The function namespace.
  @param string $name      The function name.
  
  @return Expectation The mockery expectation.
  @SuppressWarnings(PHPMD)
docstring_tokens: Builds a function mock .