0
votes
$this->formatter = $this->getMockBuilder( "TDD\Formatter" )
        ->setMethods( [ 'currencyAmt' ] )
        ->getMock();

    $this->formatter->expects( $this->any() )
        ->method( 'currencyAmt' )
        ->with( $this->anything() )
        ->will( $this->returnArgument( 0 ) );

PHPUnit 6.5.3 by Sebastian Bergmann and contributors.

........

Fatal error: Cannot use PHPUnit\Framework\MockObject\Invocation as Invocation because the name is already in use in C:\wamp64\www\unit\vendor\phpunit\phpunit-mock-objects\src\Matcher\MethodName.php on line 14

Whats wrong with my code can any help me ?

1
you are repeating a method. check your methodsJavid Karimov
Nope I don't repeat method inside the testClass I have checked which method you are saying aboutMisyaath Mohammed

1 Answers

0
votes

Its problem With PHP Version and I have reported in github they have released new version of phpunit-mock-objects If any one similar bug update your phpunit-mock-objects package further details check below link phpunit-mock-objects