A plugin whose configuration is a filter

Configuration as code, for a plugin that will never be distributed, and the test that covers it.

public function test_the_sync_is_disabled_locally(): void {
    add_filter( 'wp_get_environment_type', fn () => 'local' );

    $this->assertFalse( apply_filters( 'td_sync_should_run', true ) );
}

public function test_the_default_is_enabled(): void {
    add_filter( 'wp_get_environment_type', fn () => 'production' );

    $this->assertTrue( apply_filters( 'td_sync_should_run', true ) );
}

Testing a filter is testing the contract rather than the implementation, which is what makes the filter a genuine interface rather than a hook somebody added. The two cases are the whole surface, and a settings screen would have needed a form, a nonce, a capability check, a sanitiser and four more tests for the same three values.