File tree 2 files changed +0
-42
lines changed
2 files changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ public final class ImagePreheater {
81
81
let operation = Operation ( starter: { [ weak self] finish in
82
82
let task = self ? . pipeline. loadImage ( with: request) { [ weak self] _, _ in
83
83
self ? . _remove ( task)
84
- self ? . didFinishPreheatingRequest ? ( task. request)
85
84
finish ( )
86
85
}
87
86
token. register {
@@ -154,9 +153,6 @@ public final class ImagePreheater {
154
153
return request
155
154
}
156
155
157
- /// For testing purposes.
158
- var didFinishPreheatingRequest : ( ( ImageRequest ) -> Void ) ?
159
-
160
156
private final class Task {
161
157
let key : PreheatKey
162
158
let request : ImageRequest
Original file line number Diff line number Diff line change @@ -112,41 +112,3 @@ class ImagePreheaterTests: XCTestCase {
112
112
wait ( )
113
113
}
114
114
}
115
-
116
- class ImagePreheterDiskCacheTests : XCTestCase {
117
- var imageCache : MockImageCache !
118
- var dataLoader : MockDataLoader !
119
- var pipeline : ImagePipeline !
120
- var preheater : ImagePreheater !
121
-
122
- override func setUp( ) {
123
- super. setUp ( )
124
-
125
- pipeline = MockImagePipeline ( )
126
- dataLoader = MockDataLoader ( )
127
- imageCache = MockImageCache ( )
128
- pipeline = ImagePipeline {
129
- $0. dataLoader = dataLoader
130
- $0. imageCache = imageCache
131
- $0. imageDecoder = { _ in
132
- XCTFail ( " The pipeline tried to decode the image data " )
133
- return ImageDecoder ( )
134
- }
135
- }
136
- preheater = ImagePreheater ( pipeline: pipeline)
137
- }
138
-
139
- func testPreheatingIntoDiskCache( ) {
140
- // Given preheater with .diskCache destination
141
- preheater = ImagePreheater ( pipeline: pipeline, destination: . diskCache, maxConcurrentRequestCount: 1 )
142
-
143
- let expectation = self . expectation ( description: " Finished preheating " )
144
- preheater. didFinishPreheatingRequest = { _ in
145
- XCTAssertTrue ( self . imageCache. images. isEmpty)
146
- expectation. fulfill ( )
147
- }
148
-
149
- preheater. startPreheating ( with: [ Test . request] )
150
- wait ( )
151
- }
152
- }
You can’t perform that action at this time.
0 commit comments