function setUp() { $this->_mockInvocation = Phockito::mock(Invocation::class); $this->_mockInvocation->args = array('actualArg'); $this->_mockContext = Phockito::mock(VerificationContext::class); Phockito::when($this->_mockContext->getMethodToVerify())->return('Foo'); $this->_wantedArgs = array('wantedArg'); Phockito::when($this->_mockContext->getArgumentsToVerify())->return($this->_wantedArgs); }
function setUp() { $this->_mockInvocation = Phockito::mock(Invocation::class); $this->_mockInvocation->args = array('actualArg'); $this->_mockInvocation->backtrace = array(array('dummy - eval()\'d code'), array('file' => 'someFile.php', 'line' => 123, 'class' => 'SomeClass', 'type' => '->', 'function' => 'someMethod', 'args' => array())); $this->_mockContext = Phockito::mock(VerificationContext::class); Phockito::when($this->_mockContext->getMethodToVerify())->return('Foo'); $this->_wantedArgs = array('wantedArg'); Phockito::when($this->_mockContext->getArgumentsToVerify())->return($this->_wantedArgs); }