Services::
injectMock('email',
new MockEmail(config(Email::
class)));
} /**
* Injects the mock session driver into Services
*/
protected function mockSession() { $_SESSION =
[];
$config =
config(Session::
class);
$session =
new MockSession(new ArrayHandler($config, '0.0.0.0'
),
$config);
Services::
injectMock('session',
$session);
} // --------------------------------------------------------------------
// Assertions
// --------------------------------------------------------------------
/**
* Custom function to hook into CodeIgniter's Logging mechanism
* to check if certain messages were logged during code execution.
*
* @param string|null $expectedMessage
*
* @return bool
*/