Implemented the "mock" static constant for the URLSessionConfiguration+Constants extension in the Foundation library.
This commit is contained in:
parent
ef6a30d8c0
commit
e10c1c9f59
@ -0,0 +1,22 @@
|
||||
//
|
||||
// URLSessionConfiguration+Constants.swift
|
||||
// ReviewsFoundationKit
|
||||
//
|
||||
// Created by Javier Cicchelli on 17/03/2024.
|
||||
// Copyright © 2024 Röck+Cöde VoF. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
extension URLSessionConfiguration {
|
||||
|
||||
// MARK: Constants
|
||||
public static let mock = {
|
||||
let configuration: URLSessionConfiguration = .ephemeral
|
||||
|
||||
configuration.protocolClasses = [MockURLProtocol.self]
|
||||
|
||||
return configuration
|
||||
}()
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user