Beispiel #1
0
 /**
  * @param $function
  * @param null $paramsDefinition
  * @return $this
  */
 public function override($function, $paramsDefinition = null)
 {
     $generator = new MockFunctionGenerator($this->namespace, $function);
     if ($paramsDefinition) {
         $generator->setParamsDefinitionOverride($paramsDefinition);
     }
     $generator->override();
     return $this;
 }
 /**
  * Tests removeDefaultArguments().
  *
  * @param array $expected  The expected result.
  * @param array $arguments The input arguments.
  *
  * @test
  * @dataProvider provideTestRemoveDefaultArguments
  */
 public function testRemoveDefaultArguments(array $expected, array $arguments)
 {
     MockFunctionGenerator::removeDefaultArguments($arguments);
     $this->assertEquals($expected, $arguments);
 }