Eloquent\Phony\Spy\SpyVerifierFactory::createFromCallback PHP Method

createFromCallback() public method

Create a new spy verifier for the supplied callback.
public createFromCallback ( callable | null $callback = null ) : SpyVerifier
$callback callable | null The callback, or null to create an anonymous spy.
return SpyVerifier The newly created spy verifier.
    public function createFromCallback($callback = null)
    {
        return new SpyVerifier($this->spyFactory->create($callback), $this->matcherFactory, $this->matcherVerifier, $this->generatorVerifierFactory, $this->iterableVerifierFactory, $this->callVerifierFactory, $this->assertionRecorder, $this->assertionRenderer);
    }