Starting from iOS 13, the option to turn off wi-fi is disabled. As a workaround, when you need to test turning off wi-fi, you can go to Settings -> Developer -> Network Link Conditioner -> Turn on the “Enable” toggle -> Choose the “100% Loss” option. Please, when your test is completed, turn off the toggle.