entry = Entry::factory()->create(); app()->forgetInstance(Doubler::class); }); afterEach(function () { Mockery::close(); \Mockery::getConfiguration()->allowMockingNonExistentMethods(true); Cache::flush(); }); it('syncs doublers when a flag is added', function () { $mock = Mockery::mock(DoublerSync::class); $mock->shouldReceive('__invoke') ->once() ->andReturn(null); // Bind the mock to the container app()->instance(DoublerSync::class, $mock); $this->entry->addFlag('declined'); }); // TODO Figure out how to test