/home/techb158/ileadtechnology.com/vendor/smodav/mpesa/tests/Unit
Edit: /home/techb158/ileadtechnology.com/vendor/smodav/mpesa/tests/Unit/AuthenticatorTest.php (1422B)
'access', 'expires_in' => 3599])),
]);
$core = $this->core(new Client(['handler' => HandlerStack::create($mock)]));
$this->assertEquals('access', $core->auth()->authenticate());
$mock = new MockHandler([
new Response(403, [], json_encode(['access_token' => 'access', 'expires_in' => 3599])),
]);
$core = $this->core(new Client(['handler' => HandlerStack::create($mock)]));
$this->assertEquals('access', $core->auth()->authenticate());
$mock = new MockHandler([
new Response(403, [], json_encode(['access_token' => 'access', 'expires_in' => 600000])),
]);
$core = $this->core(new Client(['handler' => HandlerStack::create($mock)]));
$core->auth()->flushTokens();
$this->expectException(ErrorException::class);
$core->auth()->authenticate();
}
}