type(InstanceType::Mastodon) ->enabled() ->create(['consecutive_poll_failures' => 0]); $this->mock(PollFediverseAction::class) ->shouldReceive('execute') ->once() ->andThrow(new RuntimeException('connection refused')); $this->artisan('fedi-discover:poll'); $this->assertSame(1, $instance->fresh()->consecutive_poll_failures); } }