assertEquals( 'deny from all', $file_content ); // Test with "redirect" downloads method. update_option( 'woocommerce_file_download_method', 'redirect' ); WC_Admin_Settings::check_download_folder_protection(); $file_content = @file_get_contents( $file_path ); $this->assertEquals( 'Options -Indexes', $file_content ); update_option( 'woocommerce_file_download_method', $default ); } }