Example of Mock / mockery in jcergolj/laravellte

File tests/HasPwnedMock.php (link to Github)
use Valorin\Pwned\Pwned;

trait HasPwnedMock
{
    public function mockPwned($return = true)
    {
        $this->partialMock(Pwned::class)->shouldReceive('passes')->andReturn($return);
    }
}

Additional resources on mock / mockery: