Small test speedup (#11411)

Use Log::event() inside log_event()
Mock Log::event() in module tests to prevent writing to the database.
This commit is contained in:
Tony Murray
2020-04-11 19:53:25 -05:00
committed by GitHub
parent 4a6a0af489
commit 790ef61b0d
2 changed files with 10 additions and 11 deletions

View File

@@ -83,6 +83,12 @@ class OSModulesTest extends DBTestCase
{
$this->requireSnmpsim(); // require snmpsim for tests
// stub out Log::event, we don't need to store them for these tests
$this->app->bind('log', function ($app) {
return \Mockery::mock('\App\Facades\LogManager[event]', [$app])
->shouldReceive('event');
});
try {
set_debug(false); // avoid all undefined index errors in the legacy code
$helper = new ModuleTestHelper($modules, $os, $variant);