Mockery\Mock::shouldHaveReceived PHP Method

shouldHaveReceived() public method

public shouldHaveReceived ( $method, $args = null )
    public function shouldHaveReceived($method, $args = null)
    {
        $expectation = new \Mockery\VerificationExpectation($this, $method);
        if (null !== $args) {
            $expectation->withArgs($args);
        }
        $expectation->atLeast()->once();
        $director = new \Mockery\VerificationDirector($this->_mockery_getReceivedMethodCalls(), $expectation);
        $this->_mockery_expectations_count++;
        $director->verify();
        return $director;
    }

Usage Example

コード例 #1
0
 /**
  * @test
  */
 public function itShouldPublishTheEvent()
 {
     $this->eventPublishingListener->handle($this->message);
     $this->emitter->shouldHaveReceived('emit')->with($this->event);
 }
All Usage Examples Of Mockery\Mock::shouldHaveReceived